diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 4b4dad3..4d8d2c7 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -1165,7 +1165,7 @@ in } // Reusable dropdown component - component BarDropdown: PopupWindow { + component BarDropdown: PanelWindow { id: dropdown property bool open: false property bool closing: false @@ -1188,12 +1188,20 @@ in if (visible && !closing) _autoClose.restart(); } - anchor.window: bar - anchor.rect.x: alignRight ? bar.width - fullWidth - 8 : dropdownX - (fullWidth + 16) / 2 - anchor.rect.y: bar.height - anchor.edges: Edges.Top | Edges.Left - anchor.gravity: Edges.Bottom | Edges.Right - anchor.adjustment: alignRight ? PopupAdjustment.None : PopupAdjustment.Slide + screen: bar.screen + WlrLayershell.namespace: "quickshell-bar" + WlrLayershell.layer: WlrLayer.Overlay + exclusionMode: ExclusionMode.Ignore + anchors { + 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 color: "transparent" implicitWidth: fullWidth + (alignRight ? 8 : 16)