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

disable mousewheel sliders in settings

This commit is contained in:
bbedward
2025-08-31 18:48:30 -04:00
parent a22f89b687
commit 09fdd67b49
5 changed files with 12 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ Item {
property string unit: "%"
property bool showValue: true
property bool isDragging: false
property bool wheelEnabled: true
readonly property bool containsMouse: sliderMouseArea.containsMouse
signal sliderValueChanged(int newValue)
@@ -156,7 +157,7 @@ Item {
preventStealing: true
acceptedButtons: Qt.LeftButton
onWheel: function (wheelEvent) {
if (!slider.enabled) return
if (!slider.enabled || !slider.wheelEnabled) return
let delta = wheelEvent.angleDelta.y
let currentValue = slider.value
let step = Math.max(1, (slider.maximum - slider.minimum) / 20)