Commit 9e7cc16a authored by Nate Graham's avatar Nate Graham
Browse files

Fix volume slider scroll speed regression

We stopped setting its `stepSize` property which caused the increase()
and decrease() functions to scroll in increments of 0.1, which was 50x
slower.

This commit fixes that by using custom increase and decrease code to
match the previous behavior.

BUG: 446909
FIXED-IN: 21.12.1
parent 43f498f0
Pipeline #109958 passed with stage
in 17 seconds
......@@ -20,10 +20,17 @@ MouseArea {
acceptedButtons: Qt.NoButton
onWheel: {
// Can't use Slider's built-in increase() and decrease() functions here
// since they go in increments of 0.1 when the slider's stepSize is not
// defined, which is much too slow. And we don't define a stepSize for
// the slider because if we do, it gets gets tickmarks which look ugly.
if (wheel.angleDelta.y > 0) {
volumeSlider.increase()
// Increase volume
volumeSlider.value = Math.min(volumeSlider.to, volumeSlider.value + 5);
} else {
volumeSlider.decrease()
// Decrease volume
volumeSlider.value = Math.max(volumeSlider.from, volumeSlider.value - 5);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment