mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 13:32:50 -05:00
media: add scroll wheel behavior configuration (#1160)
This commit is contained in:
@@ -177,6 +177,7 @@ Singleton {
|
||||
property bool waveProgressEnabled: true
|
||||
property bool scrollTitleEnabled: true
|
||||
property bool audioVisualizerEnabled: true
|
||||
property bool audioScrollEnabled: true
|
||||
property bool clockCompactMode: false
|
||||
property bool focusedWindowCompactMode: false
|
||||
property bool runningAppsCompactMode: true
|
||||
|
||||
@@ -92,6 +92,7 @@ var SPEC = {
|
||||
waveProgressEnabled: { def: true },
|
||||
scrollTitleEnabled: { def: true },
|
||||
audioVisualizerEnabled: { def: true },
|
||||
audioScrollEnabled: { def: true },
|
||||
clockCompactMode: { def: false },
|
||||
focusedWindowCompactMode: { def: false },
|
||||
runningAppsCompactMode: { def: true },
|
||||
|
||||
@@ -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