fix inverted sliders

This commit is contained in:
Marco Martin 2011-10-11 14:52:39 +02:00
parent 2ae8e31d77
commit 896499617d
2 changed files with 15 additions and 5 deletions

View File

@ -134,11 +134,10 @@ Item {
imagePath: "widgets/frame" imagePath: "widgets/frame"
prefix: "sunken-active" prefix: "sunken-active"
height: groove.height height: groove.height
width: range.position width: inverted ? groove.width - handle.x : fakeHandle.x
anchors { x: inverted ? handle.x : 0
left: parent.left anchors.verticalCenter: parent.verticalCenter
verticalCenter: parent.verticalCenter
}
visible: range.position > 0 && slider.enabled visible: range.position > 0 && slider.enabled
} }

View File

@ -100,6 +100,17 @@ Column {
enabled: false enabled: false
} }
Text { text: "Inverted Horizontal Slider" }
PlasmaComponents.Slider {
id: invHorizontalSlider
width: 140
height: 20
inverted: true
animated: true
enabled: true
}
Text { text: "Vertical Slider" } Text { text: "Vertical Slider" }
Row { Row {