Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r794074d45d063255d30188fe2273b9243dee2b2c -r04702db7c37ca51cd4930f501a7fe3c709af1d69 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 794074d45d063255d30188fe2273b9243dee2b2c) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 04702db7c37ca51cd4930f501a7fe3c709af1d69) @@ -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 } } }