From 261f55fea5978122cb71f01775cd39d72da65f08 Mon Sep 17 00:00:00 2001 From: bbedward Date: Sat, 29 Nov 2025 22:55:14 -0500 Subject: [PATCH] dankbar: simplify transparency binding --- quickshell/DMSShell.qml | 11 +++++++---- quickshell/Modules/DankBar/DankBarWindow.qml | 13 +------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/quickshell/DMSShell.qml b/quickshell/DMSShell.qml index c873fff1..0fe204c2 100644 --- a/quickshell/DMSShell.qml +++ b/quickshell/DMSShell.qml @@ -108,10 +108,13 @@ Item { id: barRepeaterModel values: { const configs = SettingsData.barConfigs; - return configs.map(c => ({ - id: c.id, - position: c.position - })); + return configs + .map(c => ({ id: c.id, position: c.position })) + .sort((a, b) => { + const aVertical = a.position === SettingsData.Position.Left || a.position === SettingsData.Position.Right; + const bVertical = b.position === SettingsData.Position.Left || b.position === SettingsData.Position.Right; + return aVertical - bVertical; + }); } } diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index e90dbcc3..c095dbcf 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -140,7 +140,7 @@ PanelWindow { property real wingtipsRadius: barConfig?.gothCornerRadiusOverride ? (barConfig?.gothCornerRadiusValue ?? 12) : Theme.cornerRadius readonly property real _wingR: Math.max(0, wingtipsRadius) readonly property color _surfaceContainer: Theme.surfaceContainer - readonly property real _backgroundAlpha: topBarCore?.backgroundTransparency ?? (barConfig?.transparency ?? 1.0) + readonly property real _backgroundAlpha: barConfig?.transparency ?? 1.0 readonly property color _bgColor: Theme.withAlpha(_surfaceContainer, _backgroundAlpha) readonly property real _dpr: CompositorService.getScreenScale(barWindow.screen) @@ -419,7 +419,6 @@ PanelWindow { anchors.fill: parent layer.enabled: true - property real backgroundTransparency: barConfig?.transparency ?? 1.0 property bool autoHide: barConfig?.autoHide ?? false property bool revealSticky: false @@ -471,7 +470,6 @@ PanelWindow { Connections { function onBarConfigChanged() { - topBarCore.backgroundTransparency = barConfig?.transparency ?? 1.0; topBarCore.autoHide = barConfig?.autoHide ?? false; revealHold.interval = barConfig?.autoHideDelay ?? 250; } @@ -479,15 +477,6 @@ PanelWindow { target: rootWindow } - Connections { - target: SettingsData - function onBarConfigsChanged() { - Qt.callLater(() => { - topBarCore.backgroundTransparency = barConfig?.transparency ?? 1.0; - }); - } - } - function evaluateReveal() { if (!autoHide) return;