mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
nlistview: disable wheel if nothing to scroll
This commit is contained in:
@@ -190,7 +190,15 @@ Item {
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
WheelHandler {
|
||||
enabled: root.wheelScrollMultiplier !== 1.0
|
||||
enabled: !root.contentOverflows
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
||||
onWheel: event => {
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
|
||||
WheelHandler {
|
||||
enabled: root.wheelScrollMultiplier !== 1.0 && root.contentOverflows
|
||||
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
|
||||
onWheel: event => {
|
||||
const delta = event.pixelDelta.y !== 0 ? event.pixelDelta.y : event.angleDelta.y / 2;
|
||||
|
||||
Reference in New Issue
Block a user