Index: sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml =================================================================== diff -u -rdb92783a0a9dab0ddf2b68c51d15b1ae1cb3ddcc -r723c692a3a1de3b780d90bcc73a370beb22d73ab --- sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision db92783a0a9dab0ddf2b68c51d15b1ae1cb3ddcc) +++ sources/gui/qml/pages/pretreatment/create/PreTreatmentCreate.qml (.../PreTreatmentCreate.qml) (revision 723c692a3a1de3b780d90bcc73a370beb22d73ab) @@ -215,15 +215,41 @@ onReleased : vTreatmentCreate.dialysateTemp = value } + // TODO : This has to be a Component Column { id: _arterialColumn spacing: 45 anchors.horizontalCenter: parent.horizontalCenter - Text { id: _arterialLabel - visible : true - color : Colors.textMain - text : qsTr("Arterial Pressure Limits") + " " + "(" + Variables.unitTextBloodPressure + ")" - font.pixelSize : Fonts.fontPixelFluidText - anchors.left : _arterialPressureLimits.left + Row { id: _arterialTitleRow + function setColor() { + let slider = _arterialPressureLimits + let color = Colors.textDisableButton + if ( slider.minAdjusted && slider.maxAdjusted ) { + // if ( ! slider.valid ) { + // color = Colors.createTreatmentInvalidParam + // return + // } + color = Colors.textMain + } + return color + } + width : parent.width + height : _arterialLabel.height + anchors.left: parent.left + Text { id: _arterialLabel + visible : true + width : parent.width/2 + color : _arterialTitleRow.setColor() + text : qsTr("Arterial Pressure Limits") + font.pixelSize : Fonts.fontPixelFluidText + } + Text { id: _arterialUnit + visible : true + width : parent.width/2 + color : _arterialLabel.color + text : Variables.unitTextBloodPressure + font.pixelSize : Fonts.fontPixelFluidText + horizontalAlignment: Text.AlignRight + } } RangeSlider { id: _arterialPressureLimits objectName : "_arterialPressureLimitsSlider" @@ -234,7 +260,7 @@ anchors.horizontalCenter: parent.horizontalCenter ticks : true stepSnap : true - hasAdjusted : true + hasAdjust : true // Texts lowerText.visible : true @@ -281,15 +307,41 @@ } } + // TODO : This has to be a Component Column { id: _venousColumn spacing: 45 anchors.horizontalCenter: parent.horizontalCenter - Text { id: _venousLabel - visible : true - color : Colors.textMain - text : qsTr("Venous Pressure Limits") + " " + "(" + Variables.unitTextBloodPressure + ")" - font.pixelSize : Fonts.fontPixelFluidText - anchors.left : _venousPressureLimits.left + Row { id: _venousTitleRow + function setColor() { + let slider = _venousPressureLimits + let color = Colors.textDisableButton + if ( slider.minAdjusted && slider.maxAdjusted ) { + // if ( ! slider.valid ) { + // color = Colors.createTreatmentInvalidParam + // return + // } + color = Colors.textMain + } + return color + } + width : parent.width + height : _venousLabel.height + anchors.left: parent.left + Text { id: _venousLabel + visible : true + width : parent.width/2 + color : _venousTitleRow.setColor() + text : qsTr("Venous Pressure Limits") + font.pixelSize : Fonts.fontPixelFluidText + } + Text { id: _venousUnit + visible : true + width : parent.width/2 + color : _venousTitleRow.setColor() + text : Variables.unitTextBloodPressure + font.pixelSize : Fonts.fontPixelFluidText + horizontalAlignment: Text.AlignRight + } } RangeSlider { id: _venousPressureLimits objectName: "_venousPressureLimitsSlider" @@ -300,7 +352,7 @@ anchors.horizontalCenter: parent.horizontalCenter ticks : true stepSnap : true - hasAdjusted : true + hasAdjust : true // Texts lowerText.visible : true