Index: sources/gui/qml/compounds/LabelUnitText.qml =================================================================== diff -u -r9976417452cd2e151697108f47483e132ebc0cfc -rf66e9731c3c643653bacbf47c0e34a9e05774f00 --- sources/gui/qml/compounds/LabelUnitText.qml (.../LabelUnitText.qml) (revision 9976417452cd2e151697108f47483e132ebc0cfc) +++ sources/gui/qml/compounds/LabelUnitText.qml (.../LabelUnitText.qml) (revision f66e9731c3c643653bacbf47c0e34a9e05774f00) @@ -22,12 +22,13 @@ Rectangle { id: _root objectName : "_labelUnitText" - 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 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 width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight @@ -41,7 +42,7 @@ Item { id: _contentItem objectName : "_contentItem" anchors.centerIn: parent - width : childrenRect.width + width : _root.textAlignment === Text.AlignJustify ? (parent.width - (2 * Variables.defaultMargin)) : childrenRect.width height : parent.height Text { id: _label @@ -50,9 +51,10 @@ left : parent.left verticalCenter : parent.verticalCenter } - width : contentWidth + width : contentWidth color : Colors.offWhite font.pixelSize : Fonts.fontPixelContainerTitleSmall + horizontalAlignment: _root.textAlignment === Text.AlignJustify ? Text.AlignRight : Text.AlignLeft } Text { id: _unit @@ -76,6 +78,7 @@ anchors{ left : _unit.right leftMargin : Variables.defaultMargin + right : _root.textAlignment === Text.AlignJustify ? parent.right : undefined baseline : _label.baseline } width : 60