summaryrefslogtreecommitdiff
path: root/modules/drawers
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-09 17:33:16 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-09 17:33:16 +1000
commitbf558cfe83c48b0020485ddc001adebdd93ca248 (patch)
treeb1f07860ffb625d279d20990464a7ac11e59d440 /modules/drawers
parentpicker: fix clients for special ws (diff)
downloadcaelestia-shell-bf558cfe83c48b0020485ddc001adebdd93ca248.tar.gz
caelestia-shell-bf558cfe83c48b0020485ddc001adebdd93ca248.tar.bz2
caelestia-shell-bf558cfe83c48b0020485ddc001adebdd93ca248.zip
bar: better scroll actions
Also fix workspaces interaction area
Diffstat (limited to 'modules/drawers')
-rw-r--r--modules/drawers/Interactions.qml20
1 files changed, 19 insertions, 1 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 1cd1736..6b276a0 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -1,3 +1,4 @@
+import qs.components.controls
import qs.services
import qs.config
import qs.modules.bar.popouts as BarPopouts
@@ -5,7 +6,7 @@ import qs.modules.osd as Osd
import Quickshell
import QtQuick
-MouseArea {
+CustomMouseArea {
id: root
required property ShellScreen screen
@@ -42,6 +43,23 @@ MouseArea {
return y > root.height - Config.border.thickness - panel.height - Config.border.rounding && withinPanelWidth(panel, x, y);
}
+ 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);
+ }
+ }
+ }
+
anchors.fill: parent
hoverEnabled: true