summaryrefslogtreecommitdiff
path: root/src/controls/Slider.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/Slider.qml')
-rw-r--r--src/controls/Slider.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml
index e290640e..07ad74c4 100644
--- a/src/controls/Slider.qml
+++ b/src/controls/Slider.qml
@@ -331,14 +331,14 @@ Control {
onVerticalWheelMoved: {
if (verticalDelta !== 0) {
var delta = Math.abs(verticalDelta)*step > stepSize ? verticalDelta*step : verticalDelta/Math.abs(verticalDelta)*stepSize
- value -= delta * (inverted ? 1 : -1)
+ range.position = range.positionForValue(value - delta * (inverted ? 1 : -1))
}
}
onHorizontalWheelMoved: {
if (horizontalDelta !== 0) {
var delta = Math.abs(horizontalDelta)*step > stepSize ? horizontalDelta*step : horizontalDelta/Math.abs(horizontalDelta)*stepSize
- value += delta * (inverted ? 1 : -1)
+ range.position = range.positionForValue(value + delta * (inverted ? 1 : -1))
}
}
}