Index: sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDurationConfirm.qml =================================================================== diff -u -rb439b3c189b98fbe944c924ef3ff0943b83edc42 -rd948f4557217f1f0258e027a81e0b939a72fcae6 --- sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDurationConfirm.qml (.../TreatmentAdjustmentDurationConfirm.qml) (revision b439b3c189b98fbe944c924ef3ff0943b83edc42) +++ sources/gui/qml/pages/treatment/adjustments/TreatmentAdjustmentDurationConfirm.qml (.../TreatmentAdjustmentDurationConfirm.qml) (revision d948f4557217f1f0258e027a81e0b939a72fcae6) @@ -36,67 +36,6 @@ signal confirmClicked(int vNewTreatmentDuration) - component LabelUnitValue: Rectangle { id: _labelUnitValue - property alias label : _label.text - property string unit : "" - property alias value : _value.text - property color textColor : Colors.offWhite - width : (_infoArea.width - (_infoRow.spacing * 2)) / 3 - height : Variables.adjustmentLabelUnitContainerHeight - radius : 8.5 - color : Colors.panelBackgroundColor - border { - width : Variables.panelBorderWidth - color : Colors.panelBorderColor - } - - Item { id: _contentItem - anchors.centerIn: parent - width : childrenRect.width - height : parent.height - - Text { id: _label - anchors { - left : parent.left - verticalCenter : parent.verticalCenter - } - width : contentWidth - color : _labelUnitValue.textColor - font.pixelSize : Fonts.fontPixelContainerTitleSmall - } - - Text { id: _unit - anchors { - left : _label.right - leftMargin : 5 - baseline : _label.baseline - } - width : contentWidth - text : _labelUnitValue.unit.length > 0 ? ("(%1)").arg(_labelUnitValue.unit) : "" - color : _labelUnitValue.textColor - font { - pixelSize : Fonts.fontPixelContainerUnitSmall - weight : Font.Thin - } - } - - Text { id: _value - anchors{ - left : _unit.right - leftMargin : Variables.defaultMargin - baseline : _label.baseline - } - width : 60 - horizontalAlignment : Text.AlignLeft - color : Colors.ufVolumeGoalText - font { - pixelSize : Fonts.fontPixelContainerTitle - weight : Font.DemiBold - } - } - } - } - Item { id: _infoArea objectName: "_infoArea" anchors { @@ -110,25 +49,41 @@ Row { id: _infoRow objectName: "_infoRow" - anchors.centerIn: parent + + readonly property int cellWidth: (_infoRow.width - (_infoRow.spacing * 2)) / 3 + + anchors { + left : parent.left + right : parent.right + verticalCenter : parent.verticalCenter + } spacing: Variables.defaultMargin * 2 - LabelUnitValue { id: _ufVolumeGoal - label : qsTr("UF Volume Goal") - unit : Variables.unitVolume - value : _root.ufVolumeGoal.toFixed(Variables.ultrafiltrationPrecision) + LabelUnitText { id: _ufVolumeGoal + objectName : "_ufVolumeGoal" + width : _infoRow.cellWidth + label : qsTr("UF Volume Goal") + unit : Variables.unitVolume + value : _root.ufVolumeGoal.toFixed(Variables.ultrafiltrationPrecision) + valueColor : Colors.ufVolumeGoalText } - LabelUnitValue { id: _ufRate - label : qsTr("New UF Rate") - unit : Variables.unitTextRate - value : _root.ufRate.toFixed(Variables.ultrafiltrationPrecision) + LabelUnitText { id: _ufRate + objectName : "_ufRate" + width : _infoRow.cellWidth + label : qsTr("New UF Rate") + unit : Variables.unitTextRate + value : _root.ufRate.toFixed(Variables.ultrafiltrationPrecision) + valueColor : Colors.ufVolumeGoalText } - LabelUnitValue { id: _newTreatmentDuration - label : qsTr("New Treatment Duration") - unit : Variables.unitTextDuration - value : _root.newTreatmentDuration + LabelUnitText { id: _newTreatmentDuration + objectName: "_newTreatmentDuration" + width : _infoRow.cellWidth + label : qsTr("New Treatment Duration") + unit : Variables.unitTextDuration + value : _root.newTreatmentDuration + valueColor : Colors.ufVolumeGoalText } } }