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:
parent
e8ff26ef91
commit
ad99c5c91e
1 changed files with 15 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue