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

running apps: don't wrap on scroll wheel

fixes #740
This commit is contained in:
bbedward
2025-11-16 13:06:40 -05:00
parent e441607ce3
commit 6287fae065

View File

@@ -149,13 +149,13 @@ Item {
if (currentIndex === -1) {
nextIndex = 0
} else {
nextIndex = (currentIndex + 1) % windows.length
nextIndex = Math.min(currentIndex + 1, windows.length - 1)
}
} else {
if (currentIndex === -1) {
nextIndex = windows.length - 1
} else {
nextIndex = (currentIndex - 1 + windows.length) % windows.length
nextIndex = Math.max(currentIndex - 1, 0)
}
}
@@ -181,13 +181,13 @@ Item {
if (currentIndex === -1) {
nextIndex = 0
} else {
nextIndex = (currentIndex + 1) % windows.length
nextIndex = Math.min(currentIndex + 1, windows.length - 1)
}
} else {
if (currentIndex === -1) {
nextIndex = windows.length - 1
} else {
nextIndex = (currentIndex - 1 + windows.length) % windows.length
nextIndex = Math.max(currentIndex - 1, 0)
}
}