Index: sources/gui/qml/components/RangeBar.qml =================================================================== diff -u -r5dce80bb3079b3f0e6e134110e267be3277c3a8d -r229870eb947f48ebc4fed9390cd426daea5682e9 --- sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision 5dce80bb3079b3f0e6e134110e267be3277c3a8d) +++ sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision 229870eb947f48ebc4fed9390cd426daea5682e9) @@ -32,9 +32,18 @@ property alias rangebar : _rangeRect + QtObject { id: _private + property int val : isOutLower ? min : isOutUpper ? max : value + property int min : minimum + property int max : maximum + property bool isOutLower : value < min + property bool isOutUpper : value > max + property bool isOutRange : isOutLower || isOutUpper + } + property int markerHeight: Variables.rangeMarkerHeightMidle - property color markerColor : markerOutRangeNotify ? (value >= lowerBound && value <= upperBound ? Colors.rangeMarker : Colors.red) : Colors.rangeMarker - property bool markerOutRangeNotify: false + property color markerColor : markerOutRangeNotify ? ( _private.isOutRange ? Colors.red : Colors.rangeMarker) : Colors.rangeMarker + property bool markerOutRangeNotify: true property bool markerVisible : true property int markerBoundHeight : Variables.rangeMarkerHeightShort @@ -83,7 +92,7 @@ visible: _root.markerVisible decimal: _root.decimal value : parent.value - x : ((parent.width * (parent.value - minimum)) / (maximum - minimum)) + x : ((parent.width * (_private.val - _private.min)) / (_private.max - _private.min)) text.visible: true text.font.pixelSize: _root.markerFontSize hasHandle : true