From b1632a0a0355b752e7bdbc589ec4c91305e5ed31 Mon Sep 17 00:00:00 2001 From: vha Date: Sun, 28 Dec 2025 00:23:31 +0100 Subject: [PATCH] Fix #1179 normal scrolling direction (#1182) * added reverse scrolling to settings and widget * added support for dankbar scrolling * Better settings description * removed isNiri conditional from search index * fix #1179 breaking normal scroll direction --- quickshell/Modules/DankBar/DankBarWindow.qml | 6 ++++-- quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index 04add6e9..abba2fe5 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -713,7 +713,8 @@ PanelWindow { if (CompositorService.isNiri && xBehavior !== "none" && Math.abs(deltaX) > Math.abs(deltaY)) { const isMouseWheel = Math.abs(deltaX) >= 120 && (Math.abs(deltaX) % 120) === 0; - const direction = deltaX * -SettingsData.reverseScrolling < 0 ? 1 : -1; + const reverse = SettingsData.reverseScrolling ? -1 : 1; + const direction = deltaX * reverse < 0 ? 1 : -1; if (isMouseWheel) { if (handleScrollAction(xBehavior, direction)) { @@ -741,7 +742,8 @@ PanelWindow { } const isMouseWheel = Math.abs(deltaY) >= 120 && (Math.abs(deltaY) % 120) === 0; - const direction = deltaY * -SettingsData.reverseScrolling < 0 ? 1 : -1; + const reverse = SettingsData.reverseScrolling ? -1 : 1; + const direction = deltaY * reverse < 0 ? 1 : -1; if (isMouseWheel) { if (handleScrollAction(yBehavior, direction)) { diff --git a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml index 82dd20ca..eeed04dd 100644 --- a/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml +++ b/quickshell/Modules/DankBar/Widgets/WorkspaceSwitcher.qml @@ -675,7 +675,8 @@ Item { const delta = wheel.angleDelta.y; const isMouseWheel = Math.abs(delta) >= 120 && (Math.abs(delta) % 120) === 0; - const direction = delta * -SettingsData.reverseScrolling < 0 ? 1 : -1; + const reverse = SettingsData.reverseScrolling ? -1 : 1; + const direction = delta * reverse < 0 ? 1 : -1; if (isMouseWheel) { root.switchWorkspace(direction);