mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-28 14:05:21 -04:00
feat(popouts): hover & settings cleanup
This commit is contained in:
@@ -1256,6 +1256,50 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggleCard {
|
||||
iconName: "touch_app"
|
||||
title: I18n.tr("Hover Popouts")
|
||||
description: I18n.tr("Open widget popouts by hovering over the bar. Moving to another widget switches the popout.")
|
||||
visible: !dankBarTab.appearanceOnly && selectedBarConfig?.enabled
|
||||
enabled: !(selectedBarConfig?.clickThrough ?? false)
|
||||
opacity: (selectedBarConfig?.clickThrough ?? false) ? 0.5 : 1.0
|
||||
checked: selectedBarConfig?.hoverPopouts ?? false
|
||||
onToggled: checked => SettingsData.updateBarConfig(selectedBarId, {
|
||||
hoverPopouts: checked
|
||||
})
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingS
|
||||
visible: selectedBarConfig?.hoverPopouts ?? false
|
||||
leftPadding: Theme.spacingM
|
||||
|
||||
SettingsSliderRow {
|
||||
id: hoverDelaySlider
|
||||
width: parent.width - parent.leftPadding
|
||||
text: I18n.tr("Open Delay")
|
||||
description: I18n.tr("Time to rest on a widget before its popout opens")
|
||||
value: selectedBarConfig?.hoverPopoutDelay ?? 150
|
||||
minimum: 0
|
||||
maximum: 1000
|
||||
unit: "ms"
|
||||
defaultValue: 150
|
||||
onSliderValueChanged: newValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
hoverPopoutDelay: newValue
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: hoverDelaySlider
|
||||
property: "value"
|
||||
value: selectedBarConfig?.hoverPopoutDelay ?? 150
|
||||
restoreMode: Binding.RestoreBinding
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggleCard {
|
||||
iconName: "fit_screen"
|
||||
title: I18n.tr("Maximize Detection")
|
||||
@@ -1800,50 +1844,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggleCard {
|
||||
iconName: "touch_app"
|
||||
title: I18n.tr("Hover Popouts")
|
||||
description: I18n.tr("Open widget popouts by hovering over the bar. Moving to another widget switches the popout.")
|
||||
visible: !dankBarTab.appearanceOnly && selectedBarConfig?.enabled
|
||||
enabled: !(selectedBarConfig?.clickThrough ?? false)
|
||||
opacity: (selectedBarConfig?.clickThrough ?? false) ? 0.5 : 1.0
|
||||
checked: selectedBarConfig?.hoverPopouts ?? false
|
||||
onToggled: checked => SettingsData.updateBarConfig(selectedBarId, {
|
||||
hoverPopouts: checked
|
||||
})
|
||||
|
||||
Column {
|
||||
width: parent.width
|
||||
spacing: Theme.spacingS
|
||||
visible: selectedBarConfig?.hoverPopouts ?? false
|
||||
leftPadding: Theme.spacingM
|
||||
|
||||
SettingsSliderRow {
|
||||
id: hoverDelaySlider
|
||||
width: parent.width - parent.leftPadding
|
||||
text: I18n.tr("Open Delay")
|
||||
description: I18n.tr("Time to rest on a widget before its popout opens")
|
||||
value: selectedBarConfig?.hoverPopoutDelay ?? 150
|
||||
minimum: 0
|
||||
maximum: 1000
|
||||
unit: "ms"
|
||||
defaultValue: 150
|
||||
onSliderValueChanged: newValue => {
|
||||
SettingsData.updateBarConfig(selectedBarId, {
|
||||
hoverPopoutDelay: newValue
|
||||
});
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: hoverDelaySlider
|
||||
property: "value"
|
||||
value: selectedBarConfig?.hoverPopoutDelay ?? 150
|
||||
restoreMode: Binding.RestoreBinding
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsToggleCard {
|
||||
iconName: "mouse"
|
||||
title: I18n.tr("Scroll Wheel")
|
||||
|
||||
Reference in New Issue
Block a user