Index: sources/gui/qml/components/RangeBar.qml =================================================================== diff -u -r732bc047743c99a157cf147f5313194867c1f5e3 -r9391d4058233e096350d9dc3ced79aed8ed93b38 --- sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision 732bc047743c99a157cf147f5313194867c1f5e3) +++ sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision 9391d4058233e096350d9dc3ced79aed8ed93b38) @@ -38,6 +38,9 @@ property int markerBoundHeight : Variables.rangeMarkerHeightShort property color markerBoundColor : Colors.rangeMarkerShort + property bool minTextHorizontalCenter: true + property bool maxTextHorizontalCenter: true + RangeRect { id: _rangeRect x : ((parent.width * (lowerBound - parent.minimum)) / (parent.maximum - parent.minimum)) height : parent.height @@ -50,6 +53,9 @@ minText.visible: true maxText.visible: true + minText.anchors.leftMargin : minTextHorizontalCenter ? -minText.width / 2 : 0 + maxText.anchors.rightMargin : maxTextHorizontalCenter ? -maxText.width / 2 : 0 + RangeMarker { id: _rangeMarkerLowerBound text.visible: false height : markerBoundHeight @@ -63,7 +69,6 @@ color : markerBoundColor anchors.left: parent.right } - } RangeMarker { id: _rangeMarkerValue @@ -74,22 +79,4 @@ height : markerHeight color : markerColor } - - //property real margin : Variables.rangeRectMargin - // - //QtObject { id: _private - // property int length: ((parent.width * (value - minimum)) / (maximum - minimum) - (margin * 2)) - //} - // - //width : _private.length - // - //// progress Rects require to show the current values as their maxText values - //maxText.text: value - // - //anchors { - // left : parent.left - // top : parent.top - // bottom : parent.bottom - // margins : margin - //} }