Index: sources/gui/qml/components/RangeSlider.qml =================================================================== diff -u -r642f08650a7a88ad6a2305fdea6bd18365aab5c7 -r5d7dd96636bc7a647c61a43bb04ed25f5c2f6e7e --- sources/gui/qml/components/RangeSlider.qml (.../RangeSlider.qml) (revision 642f08650a7a88ad6a2305fdea6bd18365aab5c7) +++ sources/gui/qml/components/RangeSlider.qml (.../RangeSlider.qml) (revision 5d7dd96636bc7a647c61a43bb04ed25f5c2f6e7e) @@ -51,6 +51,8 @@ property real maxValueLowerBound : 0 property real maxValueUpperBound : 0 + property bool lowerBoundValid : true + property bool upperBoundValid : true property int curHandler : RangeSlider.HandlerOption.None ///< current active slider handler property int diameter : Variables.progressbarHandler ///< handlers diameter @@ -103,15 +105,15 @@ minimum : 0 maximum : 0 - /// Lable of the minimum of range + /// The label under the rangeSlider for minimum value minText { visible : true anchors.topMargin: Variables.sliderTextMargin font.pixelSize : Fonts.fontPixelSliderMarker font.bold : false } - ///< Lable of the maximum of range + /// The label under the rangeSlider for maximum value maxText { visible : true anchors.topMargin: Variables.sliderTextMargin @@ -315,6 +317,20 @@ setBound(newX) } + function getColor(vIsActive, vIsValid) { + let color = Colors.textDisableButton + if ( vIsActive ) { + if ( vIsValid ) { + color = Colors.textMain + } + else { + color = Colors.createTreatmentInvalidParam + } + } + return color + } + + /// The main range rectangle bar - This is the "highlighted" area of the slider RangeRect { id: _rangeRect property alias lowerBound : _rangeRect.minimum @@ -332,13 +348,15 @@ decimal : _root.decimal - minText { - visible: false + minText { // The minimum value label above the handle + visible : false anchors.topMargin: -60 + color : _root.getColor((_root.minAdjusted && _root.maxAdjusted), lowerBoundValid) } - maxText { - visible: false + maxText { // the maximum value label above the handle + visible : false anchors.topMargin: -60 + color : _root.getColor((_root.minAdjusted && _root.maxAdjusted), upperBoundValid) } // propagation is not working on drag !