diff options
Diffstat (limited to 'modules/drawers')
| -rw-r--r-- | modules/drawers/Drawers.qml | 16 | ||||
| -rw-r--r-- | modules/drawers/Interactions.qml | 13 | ||||
| -rw-r--r-- | modules/drawers/Panels.qml | 2 |
3 files changed, 10 insertions, 21 deletions
diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 26f177c..06183dd 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -133,17 +133,17 @@ Variants { visibilities: visibilities bar: bar } - } - BarWrapper { - id: bar + BarWrapper { + id: bar - anchors.top: parent.top - anchors.bottom: parent.bottom + anchors.top: parent.top + anchors.bottom: parent.bottom - screen: scope.modelData - visibilities: visibilities - popouts: panels.popouts + screen: scope.modelData + visibilities: visibilities + popouts: panels.popouts + } } } } diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 6b276a0..94d27cc 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -45,18 +45,7 @@ CustomMouseArea { function onWheel(event: WheelEvent): void { if (event.x < bar.implicitWidth) { - if (event.y < screen.height / 2) { - if (event.angleDelta.y > 0) - Audio.incrementVolume(); - else if (event.angleDelta.y < 0) - Audio.decrementVolume(); - } else { - const monitor = Brightness.getMonitorForScreen(screen); - if (event.angleDelta.y > 0) - monitor.setBrightness(monitor.brightness + 0.1); - else if (event.angleDelta.y < 0) - monitor.setBrightness(monitor.brightness - 0.1); - } + bar.handleWheel(event.y, event.angleDelta); } } diff --git a/modules/drawers/Panels.qml b/modules/drawers/Panels.qml index ae3a9f2..d27dca0 100644 --- a/modules/drawers/Panels.qml +++ b/modules/drawers/Panels.qml @@ -92,7 +92,7 @@ Item { const diff = root.height - Math.floor(off + nonAnimHeight); if (diff < 0) return off + diff; - return off; + return Math.max(off, 0); } } |