Index: sources/gui/qml/components/Slider.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r5001ec3cb4b5e76db9fa3c70a36e9c8d64677348 --- sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/Slider.qml (.../Slider.qml) (revision 5001ec3cb4b5e76db9fa3c70a36e9c8d64677348) @@ -25,6 +25,7 @@ */ RangeRect { id: _root property real value : _progressRect.value + property real minStop : undefined property real defaultValue : _root.minimum property real step : 1 @@ -53,6 +54,7 @@ property bool isRoundedEnds : true property bool hasBorder : true property color borderColor : Colors.borderDisableButton + property color highlightColor : Colors.sliderHighlightColor signal activeChanged() signal handleSelected() @@ -103,7 +105,7 @@ function setActiveVisuals(active) { if (active) { - color = Colors.sliderHighlightColor + color = _root.highlightColor handlerColor = Colors.createTreatmentActive } else { color = Colors.createTreatmentInactive @@ -189,6 +191,11 @@ let mMinimum = Number(_root.minimum.toFixed(decimal)) let mMaximum = Number(_root.maximum.toFixed(decimal)) + // if there is a minimum stop, then adjust the slider minimum to that value + if (minStop && mMinimum < minStop) { + mMinimum = minStop + } + // the center of the handler is aligned on the snap point and half width shall be used to set as min not the entire width. // also half of the hadler is out of slider min position when set on min, which proves the same as above. if(x < ( _handler.width / 2 ) ) { @@ -258,7 +265,7 @@ ProgressRect { id: _progressRect property real previousSliderValue: Number.NaN value : minimum - color : Colors.sliderHighlightColor + color : _root.highlightColor decimal : _root.decimal minimum : _root.minimum