Index: sources/gui/qml/components/RangeBar.qml =================================================================== diff -u -rfbce67a31ae4e294f0c609bbf6d3bf6659354a8d -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision fbce67a31ae4e294f0c609bbf6d3bf6659354a8d) +++ sources/gui/qml/components/RangeBar.qml (.../RangeBar.qml) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file RangeBar.qml * \author (last) Behrouz NematiPour - * \date (last) 06-May-2021 + * \date (last) 13-Sep-2023 * \author (original) Behrouz NematiPour * \date (original) 27-Jan-2020 * @@ -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