mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 23:12:49 -05:00
disable mousewheel sliders in settings
This commit is contained in:
@@ -204,6 +204,7 @@ Item {
|
|||||||
maximum: 100
|
maximum: 100
|
||||||
unit: "%"
|
unit: "%"
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setDockTransparency(
|
SettingsData.setDockTransparency(
|
||||||
newValue / 100)
|
newValue / 100)
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ Item {
|
|||||||
maximum: 100
|
maximum: 100
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setTopBarTransparency(
|
SettingsData.setTopBarTransparency(
|
||||||
newValue / 100)
|
newValue / 100)
|
||||||
@@ -652,6 +653,7 @@ Item {
|
|||||||
maximum: 100
|
maximum: 100
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setTopBarWidgetTransparency(
|
SettingsData.setTopBarWidgetTransparency(
|
||||||
newValue / 100)
|
newValue / 100)
|
||||||
@@ -679,6 +681,7 @@ Item {
|
|||||||
maximum: 100
|
maximum: 100
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setPopupTransparency(
|
SettingsData.setPopupTransparency(
|
||||||
newValue / 100)
|
newValue / 100)
|
||||||
|
|||||||
@@ -696,6 +696,7 @@ Item {
|
|||||||
maximum: 32
|
maximum: 32
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setTopBarSpacing(
|
SettingsData.setTopBarSpacing(
|
||||||
newValue)
|
newValue)
|
||||||
@@ -722,6 +723,7 @@ Item {
|
|||||||
maximum: 100
|
maximum: 100
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setTopBarBottomGap(
|
SettingsData.setTopBarBottomGap(
|
||||||
newValue)
|
newValue)
|
||||||
@@ -748,6 +750,7 @@ Item {
|
|||||||
maximum: 24
|
maximum: 24
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setTopBarInnerPadding(
|
SettingsData.setTopBarInnerPadding(
|
||||||
newValue)
|
newValue)
|
||||||
@@ -774,6 +777,7 @@ Item {
|
|||||||
maximum: 32
|
maximum: 32
|
||||||
unit: ""
|
unit: ""
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setCornerRadius(
|
SettingsData.setCornerRadius(
|
||||||
newValue)
|
newValue)
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ Item {
|
|||||||
SettingsData.osLogoBrightness * 100)
|
SettingsData.osLogoBrightness * 100)
|
||||||
unit: "%"
|
unit: "%"
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setOSLogoBrightness(
|
SettingsData.setOSLogoBrightness(
|
||||||
newValue / 100)
|
newValue / 100)
|
||||||
@@ -154,6 +155,7 @@ Item {
|
|||||||
SettingsData.osLogoContrast * 100)
|
SettingsData.osLogoContrast * 100)
|
||||||
unit: "%"
|
unit: "%"
|
||||||
showValue: true
|
showValue: true
|
||||||
|
wheelEnabled: false
|
||||||
onSliderValueChanged: newValue => {
|
onSliderValueChanged: newValue => {
|
||||||
SettingsData.setOSLogoContrast(
|
SettingsData.setOSLogoContrast(
|
||||||
newValue / 100)
|
newValue / 100)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Item {
|
|||||||
property string unit: "%"
|
property string unit: "%"
|
||||||
property bool showValue: true
|
property bool showValue: true
|
||||||
property bool isDragging: false
|
property bool isDragging: false
|
||||||
|
property bool wheelEnabled: true
|
||||||
readonly property bool containsMouse: sliderMouseArea.containsMouse
|
readonly property bool containsMouse: sliderMouseArea.containsMouse
|
||||||
|
|
||||||
signal sliderValueChanged(int newValue)
|
signal sliderValueChanged(int newValue)
|
||||||
@@ -156,7 +157,7 @@ Item {
|
|||||||
preventStealing: true
|
preventStealing: true
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onWheel: function (wheelEvent) {
|
onWheel: function (wheelEvent) {
|
||||||
if (!slider.enabled) return
|
if (!slider.enabled || !slider.wheelEnabled) return
|
||||||
let delta = wheelEvent.angleDelta.y
|
let delta = wheelEvent.angleDelta.y
|
||||||
let currentValue = slider.value
|
let currentValue = slider.value
|
||||||
let step = Math.max(1, (slider.maximum - slider.minimum) / 20)
|
let step = Math.max(1, (slider.maximum - slider.minimum) / 20)
|
||||||
|
|||||||
Reference in New Issue
Block a user