Index: sources/gui/qml/components/RangeBar.qml =================================================================== diff -u -race4047d1007962c136fa32d0531102e22073f32 -r9a0581274e4dc51af6d6f3e4dd932581e8dce445 --- sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision ace4047d1007962c136fa32d0531102e22073f32) +++ sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision 9a0581274e4dc51af6d6f3e4dd932581e8dce445) @@ -33,14 +33,16 @@ property alias rangebar : _rangeRect property int markerHeight: Variables.rangeMarkerHeightMidle - property color markerColor : Colors.rangeMarker + property color markerColor : markerOutRangeNotify ? (value > lowerBound && value < upperBound ? Colors.rangeMarker : Colors.red) : Colors.rangeMarker + property bool markerOutRangeNotify: false property bool markerVisible : true property int markerBoundHeight : Variables.rangeMarkerHeightShort property color markerBoundColor : Colors.rangeMarkerShort + property int markerFontSize : Fonts.fontPixelRangeMarker - property bool minTextHorizontalCenter: true - property bool maxTextHorizontalCenter: true + property bool lowerTextHorizontalCenter: true + property bool upperTextHorizontalCenter: true RangeRect { id: _rangeRect color: "red" @@ -55,9 +57,10 @@ minText.visible: true maxText.visible: true - minText.anchors.leftMargin : minTextHorizontalCenter ? -minText.width / 2 : 0 - maxText.anchors.rightMargin : maxTextHorizontalCenter ? -maxText.width / 2 : 0 + minText.anchors.leftMargin : lowerTextHorizontalCenter ? -minText.width / 2 : 0 + maxText.anchors.rightMargin : upperTextHorizontalCenter ? -maxText.width / 2 : 0 + RangeMarker { id: _rangeMarkerLowerBound decimal : _root.decimal text.visible: false @@ -73,6 +76,7 @@ color : markerBoundColor anchors.left: parent.right } + onClicked: _root.clicked(vMouseEvent) } RangeMarker { id: _rangeMarkerValue @@ -81,6 +85,7 @@ value : parent.value x : ((parent.width * (parent.value - minimum)) / (maximum - minimum)) text.visible: true + text.font.pixelSize: _root.markerFontSize hasHandle : true height : markerHeight color : markerColor