- 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);
|
||||
|
||||
//qDebug() << "Sending command: \n" << qPrintable(doc.toJson(QJsonDocument::Indented));
|
||||
qDebug() << "Sending command: \n" << qPrintable(doc.toJson(QJsonDocument::Compact));
|
||||
|
||||
this->waitingCommands ++;
|
||||
|
||||
|
|
|
@ -18,10 +18,11 @@ Item {
|
|||
property double glowSpread: 0.01
|
||||
property bool glowVisible: true
|
||||
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 int horizontalPadding: width * 0.15
|
||||
property int verticalPadding: height * 0.15
|
||||
property int radius: height * 0.5
|
||||
|
||||
signal clicked
|
||||
|
||||
|
@ -56,7 +57,7 @@ Item {
|
|||
id: background
|
||||
anchors.fill: parent
|
||||
color: control.color
|
||||
radius: height * 0.5
|
||||
radius: control.radius
|
||||
clip: true
|
||||
|
||||
Behavior on color {
|
||||
|
@ -82,7 +83,7 @@ Item {
|
|||
height: ripple.height
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: Math.min(width, height) * 0.5
|
||||
radius: control.radius
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,21 +32,61 @@ Page {
|
|||
margins: Math.min(parent.height, parent.width) * 0.05
|
||||
}
|
||||
|
||||
Chip {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 35
|
||||
DisplayTextModelListView {
|
||||
id: displayTextModelListView
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Layout.Center
|
||||
|
||||
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"
|
||||
|
||||
RowLayout {
|
||||
spacing: mainLayout.anchors.margins
|
||||
Column {
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: width * 0.05
|
||||
anchors.rightMargin: anchors.leftMargin
|
||||
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
|
||||
|
@ -71,7 +111,7 @@ Page {
|
|||
if(!pressed) {
|
||||
backend.displayBrightness = {
|
||||
"displayBrightness": value,
|
||||
"automaticBrightnessAdjustment": false
|
||||
"automaticBrightnessAdjustment": autoBrightnessSwitch.checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,18 +132,8 @@ Page {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: mainLayout.height * 0.025
|
||||
}
|
||||
|
||||
DisplayTextModelListView {
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Layout.Center
|
||||
|
||||
clip: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,13 +57,13 @@ Dialog {
|
|||
Button {
|
||||
flat: true
|
||||
enabled: nameTextField.value !== ""
|
||||
text: "save"
|
||||
text: qsTr("save")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||
}
|
||||
|
||||
Button {
|
||||
flat: true
|
||||
text: "cancel"
|
||||
text: qsTr("cancel")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ Dialog {
|
|||
|
||||
modal: true
|
||||
|
||||
title: editing ? "Edit item" : "New item"
|
||||
title: editing ? qsTr("Edit text") : qsTr("New text")
|
||||
|
||||
onAccepted: {
|
||||
if(editing) {
|
||||
|
@ -112,8 +112,8 @@ Dialog {
|
|||
ComboBoxDelegate {
|
||||
id: scrollDirectionComboBox
|
||||
Layout.fillWidth: true
|
||||
model: [qsTr("right to left"), qsTr("left to right")]
|
||||
text: qsTr("Scroll direction")
|
||||
model: [qsTr("from right to left"), qsTr("from left to right")]
|
||||
text: qsTr("Scroll")
|
||||
}
|
||||
|
||||
SpinBoxDelegate {
|
||||
|
@ -144,13 +144,13 @@ Dialog {
|
|||
Button {
|
||||
flat: true
|
||||
enabled: textTextField.value !== ""
|
||||
text: "save"
|
||||
text: qsTr("save")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
|
||||
}
|
||||
|
||||
Button {
|
||||
flat: true
|
||||
text: "cancel"
|
||||
text: qsTr("cancel")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ Dialog {
|
|||
visible: popup.editing
|
||||
Material.foreground: Material.Red
|
||||
flat: true
|
||||
text: "delete"
|
||||
text: qsTr("delete")
|
||||
DialogButtonBox.buttonRole: DialogButtonBox.DestructiveRole
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -84,6 +84,10 @@ Standort-Berechtigung verweigert!</translation>
|
|||
<source>loading...</source>
|
||||
<translation>laden...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Automically adjust brightness</source>
|
||||
<translation>Helligkeit automatisch regeln</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DisplayEditDialog</name>
|
||||
|
@ -109,6 +113,14 @@ Standort-Berechtigung verweigert!</translation>
|
|||
<source>Enter new display code again</source>
|
||||
<translation>Geben sie den neuen Display Code erneut ein</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>save</source>
|
||||
<translation>speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation>abbrechen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DisplayTextDelegate</name>
|
||||
|
@ -171,6 +183,58 @@ Standort-Berechtigung verweigert!</translation>
|
|||
<source>Scroll count</source>
|
||||
<translation>Scrolldurchläufe</translation>
|
||||
</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>
|
||||
<name>main</name>
|
||||
|
|
Loading…
Reference in a new issue