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
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user