lux-shell/components/StyledPopupWindow.qml
Benjamin Palko 11d0e4a838 try that out
2025-09-04 19:59:52 -04:00

38 lines
870 B
QML

import qs.config
import QtQuick
import Quickshell
import Quickshell.Hyprland
PopupWindow {
id: root
implicitWidth: contentItem.children.reduce((prev, child) => Math.max(prev, child.width), 0)
implicitHeight: contentItem.children.reduce((prev, child) => prev + child.height, 0)
color: "transparent"
contentItem.focus: visible
function open() {
visible = true;
}
function close() {
visible = false;
}
// WlrLayershell.layer: WlrLayer.Top
// WlrLayershell.keyboardFocus: root.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
HyprlandFocusGrab {
active: root.visible
windows: [root]
onCleared: {
root.close();
}
}
Rectangle {
id: background
anchors.fill: parent
color: Theme.palette.base200
radius: 8
}
}