Index: sources/gui/qml/pages/settings/SettingsROInput.qml =================================================================== diff -u -r934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f -r01a8c935f7d90ce3b168970765c0f20ea0c1a273 --- sources/gui/qml/pages/settings/SettingsROInput.qml (.../SettingsROInput.qml) (revision 934354462a353ff5e7fc2ddfe6f3a8f0121a8f3f) +++ sources/gui/qml/pages/settings/SettingsROInput.qml (.../SettingsROInput.qml) (revision 01a8c935f7d90ce3b168970765c0f20ea0c1a273) @@ -15,11 +15,10 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Switch - // Qml imports import "qrc:/globals" +import "qrc:/components" /*! * \brief SettingsROInput is the screen @@ -43,56 +42,20 @@ anchors.horizontalCenter: parent.horizontalCenter } - Switch { id: _settingsRoInputSwitch - property bool active: true - anchors.left : _settingsRoInputLabel.right - + BaseSwitch { id: _settingsRoInputSwitch 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) { + print("**** vDuetRoWaterDG " + vValue ) + if ( vDuetRoWaterDG.adjustment_Accepted ) { _settingsRoInput.notificationText = "" }