- Added some more translations
- Adjusted some sizes
This commit is contained in:
parent
d18eb3cce3
commit
67cf4bad19
7 changed files with 174 additions and 79 deletions
|
@ -138,7 +138,7 @@ void LedDisplayBackend::sendBluetoothCommand(OmobiDisplayCommand command, QVaria
|
||||||
|
|
||||||
QJsonDocument doc = QJsonDocument::fromVariant(commandMap);
|
QJsonDocument doc = QJsonDocument::fromVariant(commandMap);
|
||||||
|
|
||||||
//qDebug() << "Sending command: \n" << qPrintable(doc.toJson(QJsonDocument::Indented));
|
qDebug() << "Sending command: \n" << qPrintable(doc.toJson(QJsonDocument::Compact));
|
||||||
|
|
||||||
this->waitingCommands ++;
|
this->waitingCommands ++;
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,11 @@ Item {
|
||||||
property double glowSpread: 0.01
|
property double glowSpread: 0.01
|
||||||
property bool glowVisible: true
|
property bool glowVisible: true
|
||||||
property double glowScale: 1
|
property double glowScale: 1
|
||||||
property double glowOpacity: Math.pow( control.opacity, 100 ) * 0.5
|
property double glowOpacity: Math.pow( control.opacity, 1000 ) * 0.3
|
||||||
property bool interactive: true
|
property bool interactive: true
|
||||||
property int horizontalPadding: width * 0.15
|
property int horizontalPadding: width * 0.15
|
||||||
property int verticalPadding: height * 0.15
|
property int verticalPadding: height * 0.15
|
||||||
|
property int radius: height * 0.5
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ Item {
|
||||||
id: background
|
id: background
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: control.color
|
color: control.color
|
||||||
radius: height * 0.5
|
radius: control.radius
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
|
@ -82,7 +83,7 @@ Item {
|
||||||
height: ripple.height
|
height: ripple.height
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: Math.min(width, height) * 0.5
|
radius: control.radius
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,78 +32,108 @@ Page {
|
||||||
margins: Math.min(parent.height, parent.width) * 0.05
|
margins: Math.min(parent.height, parent.width) * 0.05
|
||||||
}
|
}
|
||||||
|
|
||||||
Chip {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: 35
|
|
||||||
Layout.alignment: Layout.Center
|
|
||||||
|
|
||||||
interactive: false
|
|
||||||
|
|
||||||
color: "white"
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
spacing: mainLayout.anchors.margins
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.leftMargin: width * 0.05
|
|
||||||
anchors.rightMargin: anchors.leftMargin
|
|
||||||
|
|
||||||
Text {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
font.pixelSize: parent.height * 0.5
|
|
||||||
font.family: fontAwesome.name
|
|
||||||
text: "\uf186"
|
|
||||||
}
|
|
||||||
|
|
||||||
Slider {
|
|
||||||
id: brightnessSlider
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
|
|
||||||
from: 0
|
|
||||||
to: 50
|
|
||||||
stepSize: 1
|
|
||||||
|
|
||||||
value: backend.displayBrightness.displayBrightness
|
|
||||||
|
|
||||||
onPressedChanged: {
|
|
||||||
if(!pressed) {
|
|
||||||
backend.displayBrightness = {
|
|
||||||
"displayBrightness": value,
|
|
||||||
"automaticBrightnessAdjustment": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolTip {
|
|
||||||
parent: brightnessSlider.handle
|
|
||||||
visible: brightnessSlider.pressed
|
|
||||||
text: brightnessSlider.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
Layout.fillHeight: true
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
font.pixelSize: parent.height * 0.5
|
|
||||||
font.family: fontAwesome.name
|
|
||||||
text: "\uf185"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredHeight: mainLayout.height * 0.025
|
|
||||||
}
|
|
||||||
|
|
||||||
DisplayTextModelListView {
|
DisplayTextModelListView {
|
||||||
|
id: displayTextModelListView
|
||||||
Layout.preferredWidth: parent.width
|
Layout.preferredWidth: parent.width
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.alignment: Layout.Center
|
Layout.alignment: Layout.Center
|
||||||
|
|
||||||
clip: true
|
header: Item {
|
||||||
|
|
||||||
|
width: parent.width
|
||||||
|
height: 100 + mainLayout.anchors.margins
|
||||||
|
|
||||||
|
Chip {
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
|
||||||
|
height: 100
|
||||||
|
radius: height * 0.2
|
||||||
|
|
||||||
|
interactive: false
|
||||||
|
|
||||||
|
color: "white"
|
||||||
|
|
||||||
|
Column {
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: height * 0.05
|
||||||
|
|
||||||
|
SwitchDelegate {
|
||||||
|
id: autoBrightnessSwitch
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height / 2
|
||||||
|
|
||||||
|
checked: backend.displayBrightness.automaticBrightnessAdjustment
|
||||||
|
|
||||||
|
text: qsTr("Automically adjust brightness")
|
||||||
|
|
||||||
|
onCheckedChanged: {
|
||||||
|
backend.displayBrightness = {
|
||||||
|
"displayBrightness": brightnessSlider.value,
|
||||||
|
"automaticBrightnessAdjustment": autoBrightnessSwitch.checked
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
width: parent.width - autoBrightnessSwitch.padding * 2
|
||||||
|
height: parent.height / 2
|
||||||
|
spacing: mainLayout.anchors.margins
|
||||||
|
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
font.pixelSize: parent.height * 0.5
|
||||||
|
font.family: fontAwesome.name
|
||||||
|
text: "\uf186"
|
||||||
|
}
|
||||||
|
|
||||||
|
Slider {
|
||||||
|
id: brightnessSlider
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
from: 0
|
||||||
|
to: 50
|
||||||
|
stepSize: 1
|
||||||
|
|
||||||
|
value: backend.displayBrightness.displayBrightness
|
||||||
|
|
||||||
|
onPressedChanged: {
|
||||||
|
if(!pressed) {
|
||||||
|
backend.displayBrightness = {
|
||||||
|
"displayBrightness": value,
|
||||||
|
"automaticBrightnessAdjustment": autoBrightnessSwitch.checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolTip {
|
||||||
|
parent: brightnessSlider.handle
|
||||||
|
visible: brightnessSlider.pressed
|
||||||
|
text: brightnessSlider.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
font.pixelSize: parent.height * 0.5
|
||||||
|
font.family: fontAwesome.name
|
||||||
|
text: "\uf185"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,13 +57,13 @@ Dialog {
|
||||||
Button {
|
Button {
|
||||||
flat: true
|
flat: true
|
||||||
enabled: nameTextField.value !== ""
|
enabled: nameTextField.value !== ""
|
||||||
text: "save"
|
text: qsTr("save")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
flat: true
|
flat: true
|
||||||
text: "cancel"
|
text: qsTr("cancel")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ Dialog {
|
||||||
|
|
||||||
modal: true
|
modal: true
|
||||||
|
|
||||||
title: editing ? "Edit item" : "New item"
|
title: editing ? qsTr("Edit text") : qsTr("New text")
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
if(editing) {
|
if(editing) {
|
||||||
|
@ -112,8 +112,8 @@ Dialog {
|
||||||
ComboBoxDelegate {
|
ComboBoxDelegate {
|
||||||
id: scrollDirectionComboBox
|
id: scrollDirectionComboBox
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
model: [qsTr("right to left"), qsTr("left to right")]
|
model: [qsTr("from right to left"), qsTr("from left to right")]
|
||||||
text: qsTr("Scroll direction")
|
text: qsTr("Scroll")
|
||||||
}
|
}
|
||||||
|
|
||||||
SpinBoxDelegate {
|
SpinBoxDelegate {
|
||||||
|
@ -144,13 +144,13 @@ Dialog {
|
||||||
Button {
|
Button {
|
||||||
flat: true
|
flat: true
|
||||||
enabled: textTextField.value !== ""
|
enabled: textTextField.value !== ""
|
||||||
text: "save"
|
text: qsTr("save")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
flat: true
|
flat: true
|
||||||
text: "cancel"
|
text: qsTr("cancel")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ Dialog {
|
||||||
visible: popup.editing
|
visible: popup.editing
|
||||||
Material.foreground: Material.Red
|
Material.foreground: Material.Red
|
||||||
flat: true
|
flat: true
|
||||||
text: "delete"
|
text: qsTr("delete")
|
||||||
DialogButtonBox.buttonRole: DialogButtonBox.DestructiveRole
|
DialogButtonBox.buttonRole: DialogButtonBox.DestructiveRole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -84,6 +84,10 @@ Standort-Berechtigung verweigert!</translation>
|
||||||
<source>loading...</source>
|
<source>loading...</source>
|
||||||
<translation>laden...</translation>
|
<translation>laden...</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Automically adjust brightness</source>
|
||||||
|
<translation>Helligkeit automatisch regeln</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DisplayEditDialog</name>
|
<name>DisplayEditDialog</name>
|
||||||
|
@ -109,6 +113,14 @@ Standort-Berechtigung verweigert!</translation>
|
||||||
<source>Enter new display code again</source>
|
<source>Enter new display code again</source>
|
||||||
<translation>Geben sie den neuen Display Code erneut ein</translation>
|
<translation>Geben sie den neuen Display Code erneut ein</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>save</source>
|
||||||
|
<translation>speichern</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>cancel</source>
|
||||||
|
<translation>abbrechen</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DisplayTextDelegate</name>
|
<name>DisplayTextDelegate</name>
|
||||||
|
@ -171,6 +183,58 @@ Standort-Berechtigung verweigert!</translation>
|
||||||
<source>Scroll count</source>
|
<source>Scroll count</source>
|
||||||
<translation>Scrolldurchläufe</translation>
|
<translation>Scrolldurchläufe</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Edit text</source>
|
||||||
|
<translation>Text bearbeiten</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>New text</source>
|
||||||
|
<translation>Neuer Text</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>left</source>
|
||||||
|
<translation>links</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>center</source>
|
||||||
|
<translation>mittig</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>right</source>
|
||||||
|
<translation>rechts</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>right to left</source>
|
||||||
|
<translation type="vanished">von rechts nach links</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>left to right</source>
|
||||||
|
<translation type="vanished">von links nach rechts</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Scroll direction</source>
|
||||||
|
<translation type="vanished">Scrollen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>from right to left</source>
|
||||||
|
<translation>von rechts nach links</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>from left to right</source>
|
||||||
|
<translation>von links nach rechts</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>save</source>
|
||||||
|
<translation>speichern</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>cancel</source>
|
||||||
|
<translation>abbrechen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>delete</source>
|
||||||
|
<translation>löschen</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>main</name>
|
<name>main</name>
|
||||||
|
|
Loading…
Reference in a new issue