mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
media: add scroll wheel behavior configuration (#1160)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -43,6 +43,13 @@ Item {
|
||||
checked: SettingsData.audioVisualizerEnabled
|
||||
onToggled: checked => SettingsData.set("audioVisualizerEnabled", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
text: I18n.tr("Scroll Wheel")
|
||||
description: I18n.tr("Scroll on widget changes media volume")
|
||||
checked: SettingsData.audioScrollEnabled
|
||||
onToggled: checked => SettingsData.set("audioScrollEnabled", checked)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user