mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
dankbar: restore horizontal change debounce
This commit is contained in:
@@ -28,7 +28,33 @@ Item {
|
|||||||
return pos === SettingsData.Position.Left || pos === SettingsData.Position.Right;
|
return pos === SettingsData.Position.Left || pos === SettingsData.Position.Right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: horizontalBarChangeDebounce
|
||||||
|
interval: 500
|
||||||
|
repeat: false
|
||||||
|
onTriggered: {
|
||||||
|
const verticalBars = SettingsData.barConfigs.filter(cfg => {
|
||||||
|
const pos = cfg.position ?? SettingsData.Position.Top;
|
||||||
|
return pos === SettingsData.Position.Left || pos === SettingsData.Position.Right;
|
||||||
|
});
|
||||||
|
|
||||||
|
verticalBars.forEach(bar => {
|
||||||
|
if (!bar.enabled)
|
||||||
|
return;
|
||||||
|
SettingsData.updateBarConfig(bar.id, {
|
||||||
|
enabled: false
|
||||||
|
});
|
||||||
|
Qt.callLater(() => SettingsData.updateBarConfig(bar.id, {
|
||||||
|
enabled: true
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function notifyHorizontalBarChange() {
|
function notifyHorizontalBarChange() {
|
||||||
|
if (selectedBarIsVertical)
|
||||||
|
return;
|
||||||
|
horizontalBarChangeDebounce.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
function createNewBar() {
|
function createNewBar() {
|
||||||
@@ -811,8 +837,7 @@ Item {
|
|||||||
|
|
||||||
SettingsSliderRow {
|
SettingsSliderRow {
|
||||||
id: widgetPaddingSlider
|
id: widgetPaddingSlider
|
||||||
text: I18n.tr("Widget Padding Base")
|
text: I18n.tr("Padding")
|
||||||
description: I18n.tr("Material 3 Expressive padding")
|
|
||||||
value: selectedBarConfig?.widgetPadding ?? 12
|
value: selectedBarConfig?.widgetPadding ?? 12
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 32
|
maximum: 32
|
||||||
|
|||||||
Reference in New Issue
Block a user