Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -r5b9ff6266f7ca8ae9bbd5eace92d6454359791db -re568c0be76dcf80834f68b30d7291f45172b6f69 --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 5b9ff6266f7ca8ae9bbd5eace92d6454359791db) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision e568c0be76dcf80834f68b30d7291f45172b6f69) @@ -150,9 +150,9 @@ flickDeceleration: Variables.createTreatmentFlickableDeceleration Column { id: _column - spacing: Variables.treatmentSpacing anchors.horizontalCenter: parent.horizontalCenter anchors.fill: parent + spacing: Variables.treatmentSpacing Text { id: _titleTextPrescription anchors.horizontalCenter: parent.horizontalCenter @@ -270,6 +270,7 @@ // ToDo: Consider putting the new CheckBox component into the SliderCreateTreatment component and set via boolean property // This is a full implementation of a Switch toggleSwich: _heparinDispensingRateSwitch + Switch { id: _heparinDispensingRateSwitch property bool active: false onCheckedChanged: { @@ -283,13 +284,14 @@ _heparinDispensingRate.active = ! checked } - x : width * -1.5 - y : Variables.createTreatmentSwitchYDisplacement // these values are set to align the switch with slider - width : 75 // these values are set to align the switch with slider - height : 95 // these values are set to align the switch with slider - // DEBUG: background : Rectangle { color : "white" } + anchors { + right: parent.left + rightMargin: Variables.sliderAdjustButtonRightMargin + 10 + verticalCenter: parent.verticalCenter + verticalCenterOffset: Variables.createTreatmentSwitchYDisplacement + } - indicator: Rectangle { + indicator: Rectangle { id: _heparinDispensingIndicator implicitWidth : Variables.sliderCircleDiameter * 2 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight @@ -313,12 +315,14 @@ } contentItem: Text { - text : _heparinDispensingRateSwitch.checked ? qsTr("ON") : qsTr("OFF") - font : _heparinDispensingRateSwitch.font - color : _heparinDispensingRateSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - anchors.centerIn: parent + text : _heparinDispensingRateSwitch.checked ? qsTr("ON") : qsTr("OFF") + font.pixelSize : Fonts.fontPixelSwitchOnOff + color : _heparinDispensingRateSwitch.active ? Colors.textMain : Colors.textDisableButton + verticalAlignment : Text.AlignTop + horizontalAlignment : Text.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom : _heparinDispensingIndicator.top + anchors.bottomMargin : 10 } } } @@ -350,6 +354,7 @@ // ToDo: Consider putting the new CheckBox component into the SliderCreateTreatment component and set via boolean property // This is a full implementation of a CheckBox toggleSwich: _heparinBolusVolumeSwitch + Switch { id: _heparinBolusVolumeSwitch property bool active: false onCheckedChanged: { @@ -363,13 +368,14 @@ _heparinBolusVolume.active = ! checked } - x : width * -1.5 - y : Variables.createTreatmentSwitchYDisplacement // these values are set to align the switch with slider - width : 75 // these values are set to align the switch with slider - height : 95 // these values are set to align the switch with slider - // DEBUG: background : Rectangle { color : "white" } + anchors { + right: parent.left + rightMargin: Variables.sliderAdjustButtonRightMargin + 10 + verticalCenter: parent.verticalCenter + verticalCenterOffset: Variables.createTreatmentSwitchYDisplacement + } - indicator: Rectangle { + indicator: Rectangle { id: _heparinBolusVolumeIndicator implicitWidth : Variables.sliderCircleDiameter * 2 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight @@ -393,12 +399,14 @@ } contentItem: Text { - text : _heparinBolusVolumeSwitch.checked ? qsTr("ON") : qsTr("OFF") - font : _heparinBolusVolumeSwitch.font - color : _heparinBolusVolumeSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - anchors.centerIn: parent + text : _heparinBolusVolumeSwitch.checked ? qsTr("ON") : qsTr("OFF") + font.pixelSize : Fonts.fontPixelSwitchOnOff + color : _heparinBolusVolumeSwitch.active ? Colors.textMain : Colors.textDisableButton + verticalAlignment : Text.AlignTop + horizontalAlignment : Text.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom : _heparinBolusVolumeIndicator.top + anchors.bottomMargin : 10 } } } @@ -805,6 +813,7 @@ // ToDo: Consider putting the new CheckBox component into the SliderCreateTreatment component and set via boolean property // This is a full implementation of a CheckBox toggleSwich: _bloodPressureIntervalSwitch + Switch { id: _bloodPressureIntervalSwitch property bool active: false onCheckedChanged: { @@ -818,13 +827,14 @@ } - x : width * -1.5 - y : Variables.createTreatmentSwitchYDisplacement // these values are set to align the switch with slider - width : 75 // these values are set to align the switch with slider - height : 95 // these values are set to align the switch with slider - // DEBUG: background : Rectangle { color : "white" } + anchors { + right: parent.left + rightMargin: Variables.sliderAdjustButtonRightMargin + 10 + verticalCenter: parent.verticalCenter + verticalCenterOffset: Variables.createTreatmentSwitchYDisplacement + } - indicator: Rectangle { + indicator: Rectangle { id: _bloodPressureIntervalIndicator implicitWidth : Variables.sliderCircleDiameter * 2 implicitHeight : Variables.sliderCircleDiameter - ( Variables.progressbarHandlerBorderWidth * 2 ) radius : implicitHeight @@ -848,12 +858,14 @@ } contentItem: Text { - text : _bloodPressureIntervalSwitch.checked ? qsTr("ON") : qsTr("OFF") - font : _bloodPressureIntervalSwitch.font - color : _bloodPressureIntervalSwitch.active ? Colors.textMain : Colors.textDisableButton - verticalAlignment: Text.AlignTop - horizontalAlignment: Text.AlignHCenter - anchors.centerIn: parent + text : _bloodPressureIntervalSwitch.checked ? qsTr("ON") : qsTr("OFF") + font.pixelSize : Fonts.fontPixelSwitchOnOff + color : _bloodPressureIntervalSwitch.active ? Colors.textMain : Colors.textDisableButton + verticalAlignment : Text.AlignTop + horizontalAlignment : Text.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom : _bloodPressureIntervalIndicator.top + anchors.bottomMargin : 10 } } }