nlistview: disable wheel if nothing to scroll

This commit is contained in:
Lemmy
2026-02-18 10:50:01 -05:00
parent 611e001003
commit 07b525a02d
+9 -1
View File
@@ -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;