From 763cb4e148427839e237bcd64101dbaf544b14d8 Mon Sep 17 00:00:00 2001 From: ly-sec Date: Mon, 14 Jul 2025 14:23:22 +0200 Subject: [PATCH] Add scrolling for volume icon --- Bar/Modules/Volume.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Bar/Modules/Volume.qml b/Bar/Modules/Volume.qml index 64ef35a..ad93fe7 100644 --- a/Bar/Modules/Volume.qml +++ b/Bar/Modules/Volume.qml @@ -41,4 +41,20 @@ Item { pillIndicator.show() } } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.NoButton // Accept wheel events only + propagateComposedEvents: true + onWheel: { + if (!shell) return; + let step = 5; + if (wheel.angleDelta.y > 0) { + shell.volume = Math.min(100, shell.volume + step); + } else if (wheel.angleDelta.y < 0) { + shell.volume = Math.max(0, shell.volume - step); + } + } + } }