Index: sources/gui/qml/pages/settings/SettingsROInput.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r1f9e84f74ead9e10577c8caa204c6eb911e12ab8 --- sources/gui/qml/pages/settings/SettingsROInput.qml (.../SettingsROInput.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/settings/SettingsROInput.qml (.../SettingsROInput.qml) (revision 1f9e84f74ead9e10577c8caa204c6eb911e12ab8) @@ -15,11 +15,11 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Switch - // Qml imports import "qrc:/globals" +import "qrc:/components" +import "qrc:/compounds" /*! * \brief SettingsROInput is the screen @@ -30,66 +30,25 @@ confirmVisible : false - Row { id: _settingsRoInputRow - anchors.centerIn: parent + contentItem: Item { - Text { id : _settingsRoInputLabel - text : qsTr("Pure Water Mode") - width : 300 - height : _settingsRoInputSwitch.height - color : Colors.white - font.pixelSize: Fonts.fontPixelButton - verticalAlignment : Text.AlignVCenter - horizontalAlignment : Text.AlignLeft - } + LabelUnitContainer { id: _settingsRoInputItem + anchors.horizontalCenter : parent.horizontalCenter + width : Variables.adjustmentLabelUnitContainerWidth + height : Variables.adjustmentLabelUnitContainerHeight + text : qsTr("Pure Water Mode") + contentArea.anchors.leftMargin : width * 0.75 - Switch { id: _settingsRoInputSwitch - property bool active: true + contentItem: BaseSwitch { id: _settingsRoInputSwitch + checked : vDuetRoWaterDG.status - checked : vDuetRoWaterDG.status - - width : 85 - height : 85 - - indicator: Rectangle { - implicitWidth : Variables.sliderCircleDiameter * 1.7 - implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) - radius : implicitHeight - anchors.centerIn: parent - color : _settingsRoInputSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _settingsRoInputSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive - Rectangle { - property real diameter : Variables.sliderCircleDiameter - x: _settingsRoInputSwitch.checked ? parent.width - width : 0 - anchors.verticalCenter: parent.verticalCenter - width : diameter - height : diameter - radius : diameter - color : _settingsRoInputSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive - border { - width: Variables.progressbarHandlerBorderWidth - color: Colors.textMain - } + onClicked: { + vDuetRoWaterDG.doAdjustment ( _settingsRoInputSwitch.checked ) } } - - contentItem: Text { - width : parent.width - height : parent.height - text : _settingsRoInputSwitch.checked ? qsTr("ON") : qsTr("OFF") - font.pixelSize: Fonts.fontPixelButton - color : _settingsRoInputSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment : Text.AlignTop - horizontalAlignment : Text.AlignHCenter - } } } - Connections { target: _settingsRoInputSwitch - function onClicked() { - vDuetRoWaterDG.doAdjustment ( _settingsRoInputSwitch.checked ) - } - } Connections { target: vDuetRoWaterDG function onAdjustmentTriggered(vValue) { if ( vDuetRoWaterDG.adjustment_Accepted ) {