mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
fix wheel events propagation
This commit is contained in:
@@ -157,8 +157,10 @@ Item {
|
|||||||
preventStealing: true
|
preventStealing: true
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onWheel: wheelEvent => {
|
onWheel: wheelEvent => {
|
||||||
if (!slider.wheelEnabled)
|
if (!slider.wheelEnabled) {
|
||||||
return
|
wheelEvent.accepted = false
|
||||||
|
return
|
||||||
|
}
|
||||||
let step = Math.max(1, (maximum - minimum) / 20)
|
let step = Math.max(1, (maximum - minimum) / 20)
|
||||||
let newValue = wheelEvent.angleDelta.y > 0 ? Math.min(maximum, value + step) : Math.max(minimum, value - step)
|
let newValue = wheelEvent.angleDelta.y > 0 ? Math.min(maximum, value + step) : Math.max(minimum, value - step)
|
||||||
newValue = Math.round(newValue)
|
newValue = Math.round(newValue)
|
||||||
|
|||||||
Reference in New Issue
Block a user