diff --git a/nymea-app/ui/delegates/ParamDelegate.qml b/nymea-app/ui/delegates/ParamDelegate.qml index a7c3f43f..dcad42d3 100644 --- a/nymea-app/ui/delegates/ParamDelegate.qml +++ b/nymea-app/ui/delegates/ParamDelegate.qml @@ -33,7 +33,7 @@ ItemDelegate { } Loader { id: loader - Layout.fillWidth: sourceComponent === textFieldComponent + Layout.fillWidth: true// sourceComponent === textFieldComponent || sourceComponent === stringComponent sourceComponent: { print("loading paramdelegate:", root.writable, root.paramType.type) if (!root.writable) { @@ -93,6 +93,8 @@ ItemDelegate { } return root.param.value; } + horizontalAlignment: Text.AlignRight + elide: Text.ElideRight } } Component { @@ -150,26 +152,34 @@ ItemDelegate { Component { id: spinnerComponent - SpinBox { - value: root.param.value ? root.param.value : 0 - from: root.paramType.minValue - ? root.paramType.minValue - : root.paramType.type.toLowerCase() === "uint" - ? 0 - : -2000000000 - to: root.paramType.maxValue - ? root.paramType.maxValue - : 2000000000 - editable: true - width: 150 - onValueModified: root.param.value = value - textFromValue: function(value) { - return value - } - Component.onCompleted: { - if (root.value === undefined) { - root.value = value + RowLayout { + spacing: app.margins + + SpinBox { + value: root.param.value ? root.param.value : 0 + from: root.paramType.minValue + ? root.paramType.minValue + : root.paramType.type.toLowerCase() === "uint" + ? 0 + : -2000000000 + to: root.paramType.maxValue + ? root.paramType.maxValue + : 2000000000 + editable: true + width: 150 + onValueModified: root.param.value = value + textFromValue: function(value) { + return value } + Component.onCompleted: { + if (root.value === undefined) { + root.value = value + } + } + } + Label { + text: root.paramType.unitString + visible: text.length > 0 } } } diff --git a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml index 057401ec..dcaf6293 100644 --- a/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml +++ b/nymea-app/ui/thingconfiguration/ConfigureThingPage.qml @@ -68,8 +68,10 @@ Page { Flickable { anchors.fill: parent + contentHeight: contentColumn.implicitHeight ColumnLayout { + id: contentColumn width: parent.width Label { @@ -156,7 +158,8 @@ Page { Layout.leftMargin: app.margins Layout.rightMargin: app.margins text: qsTr("Apply") - visible: settingsRepeater.dirty + enabled: settingsRepeater.dirty + visible: settingsRepeater.count > 0 onClicked: { var params = [] diff --git a/packaging/android/AndroidManifest.xml b/packaging/android/AndroidManifest.xml index a73cc177..86f661d5 100644 --- a/packaging/android/AndroidManifest.xml +++ b/packaging/android/AndroidManifest.xml @@ -45,7 +45,7 @@ application still try to draw after "applicationStateChanged(Qt::ApplicationSuspended)" signal is sent! --> - +