Index: sources/gui/qml/components/TickMarks.qml =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r5f6975c6ee7823fc884328418298128cdb97107f --- sources/gui/qml/components/TickMarks.qml (.../TickMarks.qml) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/gui/qml/components/TickMarks.qml (.../TickMarks.qml) (revision 5f6975c6ee7823fc884328418298128cdb97107f) @@ -35,30 +35,40 @@ property color color : Colors.backgroundDialog - property int orientation : Line.Orientation.Vertical - property int length : parent.height - property int thickness : 1 + property bool isTickMarkRound : false + property real roundTickMarkDiameter : Variables.sliderDefaultRoundTickMarkDiameter + property real yDisplacement : 0 + property bool showFirstMark : true + // For the case that the tickmark is a line + property real lineTickMarkHeight : 20 + property real lineTickMarkThickness : 1 + property bool textVisible : false property color textColor : Colors.textMain anchors.fill: parent Repeater { id : _repeater - model: (maximum - minimum) / step // + 1 - Line { id: _line + model: (maximum - minimum) / step + 1 + + Rectangle { property int gap : stepSnap ? - ( - (parent.width * (step - (minimum % step))) / (maximum - minimum) - ) : 0 - orientation : _root.orientation - thickness : _root.thickness + ( + (parent.width * (step - (minimum % step))) / (maximum - minimum) + ) : 0 + + visible : (index > 0) || (index === 0 && showFirstMark) + x : (((index * step) * (parent.width - parent.x)) / (maximum - minimum)) + gap - width/2 + y : _root.yDisplacement + Variables.rangeRectBorderWidth // adjusting the y of the line tick to account for the slider border color : _root.color - length : _root.length - x: (((index * step) * (parent.width - parent.x)) / (maximum - minimum)) + gap - y: 0 + + height : isTickMarkRound ? _root.roundTickMarkDiameter : _root.lineTickMarkHeight + width : isTickMarkRound ? _root.roundTickMarkDiameter : _root.lineTickMarkThickness + radius : isTickMarkRound ? _root.roundTickMarkDiameter : 0 + Text { id : _text - visible: textVisible + visible: _root.textVisible color: _root.textColor font.pixelSize: 10 text: ((index * step) + minimum).toFixed(decimal)