Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r70120c2a612e9118f716aa8dca3aefdeed7d2deb -r4cf5db7e5d4c7c463d30964c2487719b9c136b0e --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 70120c2a612e9118f716aa8dca3aefdeed7d2deb) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 4cf5db7e5d4c7c463d30964c2487719b9c136b0e) @@ -188,9 +188,6 @@ inActiveZero: true Switch { id: _heparinDispensingRateSwitch - readonly property int switchBgWidth: Variables.sliderCircleDiameter * 1.7 - readonly property int switchBgHeight: Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) - property bool active: false onCheckedChanged: { if ( ! active ) { @@ -205,32 +202,26 @@ x : width * -2 y : parent.height - 13 // (height / 2) width : indicator.width - indicator: Item { - height: _heparinDispensingRateSwitch.switchBgHeight * 1.25 - width: _heparinDispensingRateSwitch.switchBgWidth * 1.5 - + indicator: Rectangle { + implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) + radius : implicitHeight + x : _heparinDispensingRateSwitch.leftPadding + y : parent.height / 2 - height / 2 + color : _heparinDispensingRateSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _heparinDispensingRateSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { - anchors.centerIn: parent - implicitWidth : _heparinDispensingRateSwitch.switchBgWidth - implicitHeight : _heparinDispensingRateSwitch.switchBgHeight - radius : implicitHeight - x : _heparinDispensingRateSwitch.leftPadding - y : parent.height / 2 - height / 2 - color : _heparinDispensingRateSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _heparinDispensingRateSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive - Rectangle { - property real diameter : Variables.sliderCircleDiameter + property real diameter : Variables.sliderCircleDiameter - x: _heparinDispensingRateSwitch.checked ? parent.width - width : 0 - anchors.verticalCenter: parent.verticalCenter - width : diameter - height : diameter - radius : diameter - color : _heparinDispensingRateSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive - border { - width: Variables.progressbarHandlerBorderWidth - color: Colors.textMain - } + x: _heparinDispensingRateSwitch.checked ? parent.width - width : 0 + anchors.verticalCenter: parent.verticalCenter + width : diameter + height : diameter + radius : diameter + color : _heparinDispensingRateSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive + border { + width: Variables.progressbarHandlerBorderWidth + color: Colors.textMain } } } @@ -265,9 +256,6 @@ inActiveZero: true Switch { id: _heparinBolusVolumeSwitch - readonly property int switchBgWidth: Variables.sliderCircleDiameter * 1.7 - readonly property int switchBgHeight: Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) - property bool active: false onCheckedChanged: { if ( ! active ) { @@ -283,33 +271,26 @@ x : width * -2 y : parent.height - 13 // (height / 2) width : indicator.width - - indicator: Item { - height: _heparinBolusVolumeSwitch.switchBgHeight * 1.25 - width: _heparinBolusVolumeSwitch.switchBgWidth * 1.5 - + indicator: Rectangle { + implicitWidth : Variables.sliderCircleDiameter * 1.7 + implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) + radius : implicitHeight + x : _heparinBolusVolumeSwitch.leftPadding + y : parent.height / 2 - height / 2 + color : _heparinBolusVolumeSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _heparinBolusVolumeSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive Rectangle { - anchors.centerIn: parent - implicitWidth :_heparinBolusVolumeSwitch.switchBgWidth - implicitHeight : _heparinBolusVolumeSwitch.switchBgHeight - radius : implicitHeight - x : _heparinBolusVolumeSwitch.leftPadding - y : parent.height / 2 - height / 2 - color : _heparinBolusVolumeSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive - border.color : _heparinBolusVolumeSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive - Rectangle { - property real diameter : Variables.sliderCircleDiameter + property real diameter : Variables.sliderCircleDiameter - x: _heparinBolusVolumeSwitch.checked ? parent.width - width : 0 - anchors.verticalCenter: parent.verticalCenter - width : diameter - height : diameter - radius : diameter - color : _heparinBolusVolumeSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive - border { - width: Variables.progressbarHandlerBorderWidth - color: Colors.textMain - } + x: _heparinBolusVolumeSwitch.checked ? parent.width - width : 0 + anchors.verticalCenter: parent.verticalCenter + width : diameter + height : diameter + radius : diameter + color : _heparinBolusVolumeSwitch.active ? Colors.highlightProgressBar : Colors.createTreatmentInactive + border { + width: Variables.progressbarHandlerBorderWidth + color: Colors.textMain } } }