quickshell: convert dropdowns from PopupWindow to PanelWindow

Gives each dropdown its own layer surface so Hyprland blur
layer rules apply to them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-27 14:35:31 +01:00
parent e8ff26ef91
commit ad99c5c91e

View file

@ -1165,7 +1165,7 @@ in
} }
// Reusable dropdown component // Reusable dropdown component
component BarDropdown: PopupWindow { component BarDropdown: PanelWindow {
id: dropdown id: dropdown
property bool open: false property bool open: false
property bool closing: false property bool closing: false
@ -1188,12 +1188,20 @@ in
if (visible && !closing) _autoClose.restart(); if (visible && !closing) _autoClose.restart();
} }
anchor.window: bar screen: bar.screen
anchor.rect.x: alignRight ? bar.width - fullWidth - 8 : dropdownX - (fullWidth + 16) / 2 WlrLayershell.namespace: "quickshell-bar"
anchor.rect.y: bar.height WlrLayershell.layer: WlrLayer.Overlay
anchor.edges: Edges.Top | Edges.Left exclusionMode: ExclusionMode.Ignore
anchor.gravity: Edges.Bottom | Edges.Right anchors {
anchor.adjustment: alignRight ? PopupAdjustment.None : PopupAdjustment.Slide top: true
left: !alignRight
right: alignRight
}
margins.top: bar.implicitHeight
margins.left: alignRight ? 0 : Math.min(
bar.width - implicitWidth,
Math.max(0, dropdownX - (fullWidth + 16) / 2)
)
visible: false visible: false
color: "transparent" color: "transparent"
implicitWidth: fullWidth + (alignRight ? 8 : 16) implicitWidth: fullWidth + (alignRight ? 8 : 16)