Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r987ea5bbcaf541b46eb6d1beb9d34ba9e03af709 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 987ea5bbcaf541b46eb6d1beb9d34ba9e03af709) @@ -199,15 +199,17 @@ _heparinDispensingRate.active = ! checked } - x : width * -2 - y : parent.height - 13 // (height / 2) - width : indicator.width + x : width * -1.5 + y : 5 // these values are set to align the switch with slider + width : 75 // these values are set to align the switch with slider + height : 85 // these values are set to align the switch with slider + // DEBUG: background : Rectangle { color : "white" } + indicator: Rectangle { implicitWidth : Variables.sliderCircleDiameter * 1.7 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight - x : _heparinDispensingRateSwitch.leftPadding - y : parent.height / 2 - height / 2 + anchors.centerIn: parent color : _heparinDispensingRateSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive border.color : _heparinDispensingRateSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { @@ -227,14 +229,12 @@ } contentItem: Text { - width : _heparinDispensingRateSwitch.width text : _heparinDispensingRateSwitch.checked ? qsTr("ON") : qsTr("OFF") font : _heparinDispensingRateSwitch.font color : _heparinDispensingRateSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignVCenter + verticalAlignment: Text.AlignTop horizontalAlignment: Text.AlignHCenter - anchors.bottom: _heparinDispensingRateSwitch.top - anchors.bottomMargin: 12 + anchors.centerIn: parent } } } @@ -268,15 +268,17 @@ } - x : width * -2 - y : parent.height - 13 // (height / 2) - width : indicator.width + x : width * -1.5 + y : 5 // these values are set to align the switch with slider + width : 75 // these values are set to align the switch with slider + height : 85 // these values are set to align the switch with slider + // DEBUG: background : Rectangle { color : "white" } + indicator: Rectangle { implicitWidth : Variables.sliderCircleDiameter * 1.7 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight - x : _heparinBolusVolumeSwitch.leftPadding - y : parent.height / 2 - height / 2 + anchors.centerIn: parent color : _heparinBolusVolumeSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive border.color : _heparinBolusVolumeSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { @@ -296,14 +298,12 @@ } contentItem: Text { - width : _heparinBolusVolumeSwitch.width text : _heparinBolusVolumeSwitch.checked ? qsTr("ON") : qsTr("OFF") font : _heparinBolusVolumeSwitch.font color : _heparinBolusVolumeSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignVCenter + verticalAlignment: Text.AlignTop horizontalAlignment: Text.AlignHCenter - anchors.bottom: _heparinBolusVolumeSwitch.top - anchors.bottomMargin: 12 + anchors.centerIn: parent } } }