aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-04-14 14:33:53 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-04-14 12:35:46 +0000
commite7c51fcb3df76ddb640666647bdc535005f56b30 (patch)
tree0a745edd155ad15a9e8d882d1ac48c4a7e2227fb /src/imports/controls
parent52c33410d209f0c540d649c1fdf690f4c8d0a1d0 (diff)
Fix vertical Slider
Change-Id: Idaa1416bdc09ad2ff469f7ddebcf8212bdeb1b2c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/imports/controls')
-rw-r--r--src/imports/controls/Slider.qml9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/imports/controls/Slider.qml b/src/imports/controls/Slider.qml
index 16d33613..3c9c406b 100644
--- a/src/imports/controls/Slider.qml
+++ b/src/imports/controls/Slider.qml
@@ -78,6 +78,7 @@ AbstractSlider {
}
track: Rectangle {
+ id: track
readonly property bool horizontal: control.orientation === Qt.Horizontal
implicitWidth: horizontal ? 120 : 6
implicitHeight: horizontal ? 6 : 120
@@ -89,13 +90,13 @@ AbstractSlider {
radius: control.Theme.roundness
border.color: control.Theme.frameColor
color: control.Theme.backgroundColor
- scale: control.effectiveLayoutDirection === Qt.RightToLeft ? -1 : 1
+ scale: horizontal && control.effectiveLayoutDirection === Qt.RightToLeft ? -1 : 1
Rectangle {
x: 2
- y: 2
- width: control.position * parent.width - 4
- height: 2
+ y: track.horizontal ? 2 : control.visualPosition * parent.height + 2
+ width: track.horizontal ? control.position * parent.width - 4 : 2
+ height: track.horizontal ? 2 : control.position * parent.height - 4
color: control.Theme.accentColor
radius: control.Theme.roundness