From d6b08c303a71a35df294fbca0c68aba744edbcc4 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 28 Aug 2014 13:15:09 +0200 Subject: [PATCH] style tickmarks --- .../plasmacomponents/qml/styles/SliderStyle.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmacomponents/qml/styles/SliderStyle.qml b/src/declarativeimports/plasmacomponents/qml/styles/SliderStyle.qml index 846df8bf5..b6ea4ad54 100644 --- a/src/declarativeimports/plasmacomponents/qml/styles/SliderStyle.qml +++ b/src/declarativeimports/plasmacomponents/qml/styles/SliderStyle.qml @@ -77,5 +77,14 @@ QtQuickControlStyle.SliderStyle { } - // tickmarks: + tickmarks: Repeater { + id: repeater + model: control.stepSize > 0 ? 1 + (control.maximumValue - control.minimumValue) / control.stepSize : 0 + Rectangle { + color: theme.textColor + width: 1 ; height: 3 + y: repeater.height + x: styleData.handleWidth / 2 + index * ((repeater.width - styleData.handleWidth) / (repeater.count-1)) + } + } }