Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -rb641324701258ee2cd521c226ba12091a133e158 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision b641324701258ee2cd521c226ba12091a133e158) @@ -188,6 +188,9 @@ 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 ) { @@ -202,26 +205,32 @@ x : width * -2 y : parent.height - 13 // (height / 2) width : indicator.width - 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 + indicator: Item { + height: _heparinDispensingRateSwitch.switchBgHeight * 1.25 + width: _heparinDispensingRateSwitch.switchBgWidth * 1.5 + Rectangle { - property real diameter : Variables.sliderCircleDiameter + 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 - 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 + } } } } @@ -256,6 +265,9 @@ 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 ) { @@ -271,26 +283,33 @@ x : width * -2 y : parent.height - 13 // (height / 2) width : indicator.width - 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 { - 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 + indicator: Item { + height: _heparinBolusVolumeSwitch.switchBgHeight * 1.25 + width: _heparinBolusVolumeSwitch.switchBgWidth * 1.5 + + Rectangle { id: _indicatorBackground + anchors.centerIn: parent + implicitWidth :_heparinBolusVolumeSwitch.switchBgWidth + implicitHeight : _heparinBolusVolumeSwitch.switchBgHeight + radius : implicitHeight + x : _heparinBolusVolumeSwitch.leftPadding + y : parent.height / 2 - height / 2 + color : "red"//_heparinBolusVolumeSwitch.checked ? Colors.backgroundButtonSelect : Colors.createTreatmentInactive + border.color : _heparinBolusVolumeSwitch.checked ? Colors.borderButton : Colors.createTreatmentInactive + Rectangle { id: _indicatorKnob + 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 + } } } }