Index: sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml =================================================================== diff -u -rf8c80661c806c50047e81d581df0dd6e05f1c8ef -rad57884fca3e8a0916b6d6bf51a69264b9b5263f --- sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml (.../TreatmentAdjustmentUltrafiltrationMetrics.qml) (revision f8c80661c806c50047e81d581df0dd6e05f1c8ef) +++ sources/gui/qml/compounds/TreatmentAdjustmentUltrafiltrationMetrics.qml (.../TreatmentAdjustmentUltrafiltrationMetrics.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) @@ -26,66 +26,42 @@ * that display the ultrafiltration volume removed and goal. */ Item { id: _root - property real setVolume : 0 - property real volumeRemoved : 0 + property alias leftLabel : _left.label + property alias leftUnit : _left.unit + property alias leftValue : _left.value + property alias leftColor : _left.valueColor + property alias rightLabel : _right.label + property alias rightUnit : _right.unit + property alias rightValue : _right.value + property alias rightColor : _right.valueColor - component ValueItem: Rectangle { id: _valueItem - property alias label : _label.text - property alias value : _value.text - property color textColor : Colors.fluidText - anchors.centerIn : parent - width : 350 - height : 60 - radius : 5 - color : Colors.panelBackgroundColor - border { - width : Variables.panelBorderWidth - color : Colors.panelBorderColor - } + implicitWidth : (_left.width * 2) + Variables.columnSpacing + implicitHeight : _left.height - Item { id: _textContainer - anchors.centerIn: parent - width : childrenRect.width - height : parent.height - - Text { id: _label - anchors{ - left : parent.left - verticalCenter : parent.verticalCenter - } - width : contentWidth - color : textColor - font { - pixelSize : Fonts.fontPixelButton - weight : Font.Medium - } - } - - Text { id: _value - anchors{ - left : _label.right - verticalCenter : parent.verticalCenter - } - width : contentWidth - color : textColor - font { - pixelSize : Fonts.fontPixelUltrafiltrationAdjustmentMetrics - weight : Font.DemiBold - } - } + LabelUnitText { id: _left + objectName : "_left" + anchors { + horizontalCenter : parent.horizontalCenter + horizontalCenterOffset : -(width + Variables.columnSpacing)/2 + verticalCenter : parent.verticalCenter } + width : 420 + label : "" + unit : "" + value : "" } - ValueItem { id: _ufVolumeRemovedItem - anchors.horizontalCenterOffset : -(width/2 + 30) - label : qsTr("UF Volume Removed: ") - value : _root.volumeRemoved.toFixed(Variables.ultrafiltrationPrecision) + LabelUnitText { id: _right + objectName : "_right" + anchors { + horizontalCenter : parent.horizontalCenter + horizontalCenterOffset : (width + Variables.columnSpacing)/2 + verticalCenter : parent.verticalCenter + } + width : _left.width + label : qsTr("UF Volume Goal") + unit : Variables.unitVolume + value : _root.rightValue.toFixed(Variables.ultrafiltrationPrecision) + valueColor : Colors.fluidText } - - ValueItem { id: _ufVolumeGoalItem - anchors.horizontalCenterOffset : -(_ufVolumeRemovedItem.anchors.horizontalCenterOffset) - textColor : Colors.ufVolumeGoalText - label : qsTr("UF Volume Goal: ") - value : _root.setVolume.toFixed(Variables.ultrafiltrationPrecision) - } }