1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 22:12:50 -05:00

media: add scroll wheel behavior configuration (#1160)

This commit is contained in:
xxyangyoulin
2025-12-27 03:43:47 +08:00
committed by GitHub
parent 5ac81e6dd6
commit 1194f3ffb8
4 changed files with 13 additions and 1 deletions

View File

@@ -52,9 +52,12 @@ BasePill {
property real touchpadThreshold: 100
onWheel: function (wheelEvent) {
wheelEvent.accepted = true;
if (!usePlayerVolume)
return;
if (!SettingsData.audioScrollEnabled)
return;
wheelEvent.accepted = true;
const deltaY = wheelEvent.angleDelta.y;
const isMouseWheelY = Math.abs(deltaY) >= 120 && (Math.abs(deltaY) % 120) === 0;