Index: sources/gui/qml/compounds/LabelUnitText.qml =================================================================== diff -u -rad57884fca3e8a0916b6d6bf51a69264b9b5263f -rf66e9731c3c643653bacbf47c0e34a9e05774f00 --- sources/gui/qml/compounds/LabelUnitText.qml (.../LabelUnitText.qml) (revision ad57884fca3e8a0916b6d6bf51a69264b9b5263f) +++ sources/gui/qml/compounds/LabelUnitText.qml (.../LabelUnitText.qml) (revision f66e9731c3c643653bacbf47c0e34a9e05774f00) @@ -22,19 +22,14 @@ Rectangle { id: _root objectName : "_labelUnitText" - enum Layout { - Center, - Justify - } + property alias label : _label.text + property alias labelColor : _label.color + property string unit : "" + property alias value : _value.text + property alias valueColor : _value.color + property alias valueWidth : _value.width + property int textAlignment : Text.AlignHCenter - property alias label : _label.text - property alias labelColor : _label.color - property string unit : "" - property alias value : _value.text - property alias valueColor : _value.color - property alias valueWidth : _value.width - property int layout : LabelUnitText.Layout.Center - width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight radius : 8.5 @@ -47,7 +42,7 @@ Item { id: _contentItem objectName : "_contentItem" anchors.centerIn: parent - width : _root.layout === LabelUnitText.Layout.Justify ? (parent.width - (2 * Variables.defaultMargin)) : childrenRect.width + width : _root.textAlignment === Text.AlignJustify ? (parent.width - (2 * Variables.defaultMargin)) : childrenRect.width height : parent.height Text { id: _label @@ -59,7 +54,7 @@ width : contentWidth color : Colors.offWhite font.pixelSize : Fonts.fontPixelContainerTitleSmall - horizontalAlignment: _root.layout === LabelUnitText.Layout.Justify ? Text.AlignRight : Text.AlignLeft + horizontalAlignment: _root.textAlignment === Text.AlignJustify ? Text.AlignRight : Text.AlignLeft } Text { id: _unit @@ -83,7 +78,7 @@ anchors{ left : _unit.right leftMargin : Variables.defaultMargin - right : _root.layout === LabelUnitText.Layout.Justify ? parent.right : undefined + right : _root.textAlignment === Text.AlignJustify ? parent.right : undefined baseline : _label.baseline } width : 60