1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

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
This commit is contained in:
vha
2025-12-28 00:23:31 +01:00
committed by GitHub
parent 7aff1182c8
commit b1632a0a03
2 changed files with 6 additions and 3 deletions

View File

@@ -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)) {