diff --git a/nymea-app/ui/NewDeviceWizard.qml b/nymea-app/ui/NewDeviceWizard.qml index 121683c7..6f860f84 100644 --- a/nymea-app/ui/NewDeviceWizard.qml +++ b/nymea-app/ui/NewDeviceWizard.qml @@ -322,7 +322,7 @@ Page { id: paramRepeater model: d.deviceDescriptorId == null ? d.deviceClass.paramTypes : null delegate: ParamDelegate { - Layout.preferredHeight: 60 +// Layout.preferredHeight: 60 Layout.fillWidth: true paramType: d.deviceClass.paramTypes.get(index) } diff --git a/nymea-app/ui/delegates/ParamDelegate.qml b/nymea-app/ui/delegates/ParamDelegate.qml index ae4a51e5..71ba3bfe 100644 --- a/nymea-app/ui/delegates/ParamDelegate.qml +++ b/nymea-app/ui/delegates/ParamDelegate.qml @@ -17,7 +17,10 @@ ItemDelegate { } property bool writable: true + topPadding: 0 + bottomPadding: 0 contentItem: ColumnLayout { + id: contentItemColumn RowLayout { Label { Layout.fillWidth: true @@ -167,7 +170,7 @@ ItemDelegate { ColorPicker { id: colorPicker implicitHeight: 200 -// color: root.param.value + // color: root.param.value Binding { target: colorPicker diff --git a/nymea-app/ui/devicelistpages/SensorsDeviceListPage.qml b/nymea-app/ui/devicelistpages/SensorsDeviceListPage.qml index 5061321f..469e7e92 100644 --- a/nymea-app/ui/devicelistpages/SensorsDeviceListPage.qml +++ b/nymea-app/ui/devicelistpages/SensorsDeviceListPage.qml @@ -101,7 +101,7 @@ DeviceListPageBase { Label { Layout.fillWidth: true text: sensorValueDelegate.stateValue - ? "%1 %2".arg(sensorValueDelegate.stateValue.value).arg(sensorValueDelegate.stateType.unitString) + ? "%1 %2".arg(Math.round(sensorValueDelegate.stateValue.value * 100) / 100).arg(sensorValueDelegate.stateType.unitString) : "" elide: Text.ElideRight verticalAlignment: Text.AlignVCenter diff --git a/nymea-app/ui/mainviews/DevicesPageDelegate.qml b/nymea-app/ui/mainviews/DevicesPageDelegate.qml index 95f635c1..fa8845b6 100644 --- a/nymea-app/ui/mainviews/DevicesPageDelegate.qml +++ b/nymea-app/ui/mainviews/DevicesPageDelegate.qml @@ -389,7 +389,7 @@ MainPageTile { // switch (model.name) { // case "sensor": // } - return parent.state.value + "°C"; + return (Math.round(parent.state.value * 100) / 100) + " °C"; } } } diff --git a/nymea-app/ui/system/MqttPolicyPage.qml b/nymea-app/ui/system/MqttPolicyPage.qml index 7b6274a6..ba958481 100644 --- a/nymea-app/ui/system/MqttPolicyPage.qml +++ b/nymea-app/ui/system/MqttPolicyPage.qml @@ -77,11 +77,26 @@ Page { text: qsTr("Password:") Layout.fillWidth: true } - TextField { - Layout.fillWidth: true - text: root.policy ? root.policy.password : "" - onEditingFinished: root.policy.password = text - placeholderText: qsTr("Optional") + RowLayout { + TextField { + id: passwordTextField + Layout.fillWidth: true + text: root.policy ? root.policy.password : "" + onEditingFinished: root.policy.password = text + placeholderText: qsTr("Optional") + echoMode: hiddenPassword ? TextInput.Password : TextInput.Normal + property bool hiddenPassword: true + } + ColorIcon { + Layout.preferredHeight: app.iconSize + Layout.preferredWidth: height + name: "../images/eye.svg" + color: passwordTextField.hiddenPassword ? keyColor : app.accentColor + MouseArea { + anchors.fill: parent + onClicked: passwordTextField.hiddenPassword = !passwordTextField.hiddenPassword + } + } } }