1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-07 19:59:14 -04:00

fix wheel events propagation

This commit is contained in:
bbedward
2025-09-09 09:24:47 -04:00
parent c9d38ec6f3
commit 1c7d8a55f3
+4 -2
View File
@@ -157,8 +157,10 @@ Item {
preventStealing: true
acceptedButtons: Qt.LeftButton
onWheel: wheelEvent => {
if (!slider.wheelEnabled)
return
if (!slider.wheelEnabled) {
wheelEvent.accepted = false
return
}
let step = Math.max(1, (maximum - minimum) / 20)
let newValue = wheelEvent.angleDelta.y > 0 ? Math.min(maximum, value + step) : Math.max(minimum, value - step)
newValue = Math.round(newValue)