Index: sources/gui/qml/components/SliderCreateTreatment.qml =================================================================== diff -u -r22ad47530c68333209f2006f54dbdcef9efd20aa -rc80e4dade15bd769ea20f8098b37655fb22407b7 --- sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision 22ad47530c68333209f2006f54dbdcef9efd20aa) +++ sources/gui/qml/components/SliderCreateTreatment.qml (.../SliderCreateTreatment.qml) (revision c80e4dade15bd769ea20f8098b37655fb22407b7) @@ -35,6 +35,7 @@ property alias value : _slider.value property alias step : _slider.step property alias inActiveZero: _slider.inActiveZero + property alias showActiveDisabled : _slider.showActiveDisabled property string zeroLabel : "" @@ -53,9 +54,19 @@ anchors.horizontalCenter: parent.horizontalCenter + QtObject { id: _private + property bool setVisualActive : _root.active + } + + // Allows overriding the visual coloring for active/inactive binding + function overrideActiveVisual(vSetActive) { + _slider.setActiveVisuals(vSetActive) + _private.setVisualActive = Qt.binding(function(){return vSetActive;}) + } + function setColor() { let color = Colors.textDisableButton - if ( _root.active ) { + if ( _root.active || _private.setVisualActive) { if ( _root.valid ) { color = Colors.textMain } @@ -75,7 +86,7 @@ let mValue = "__" let unit = " " + _root.unit - if ( _root.active ) { + if ( _root.active && _slider.handleAdjusted) { mValue = _slider.value.toFixed(decimal) } return mValue + unit