try that out
This commit is contained in:
parent
3074bcae38
commit
11d0e4a838
3 changed files with 152 additions and 168 deletions
|
|
@ -6,9 +6,10 @@ import Quickshell.Hyprland
|
|||
PopupWindow {
|
||||
id: root
|
||||
|
||||
implicitWidth: background.implicitWidth
|
||||
implicitHeight: background.implicitHeight
|
||||
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;
|
||||
|
|
@ -18,8 +19,10 @@ PopupWindow {
|
|||
visible = false;
|
||||
}
|
||||
|
||||
// WlrLayershell.layer: WlrLayer.Top
|
||||
// WlrLayershell.keyboardFocus: root.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
active: root.visible
|
||||
windows: [root]
|
||||
onCleared: {
|
||||
root.close();
|
||||
|
|
@ -28,9 +31,7 @@ PopupWindow {
|
|||
|
||||
Rectangle {
|
||||
id: background
|
||||
anchors.centerIn: root
|
||||
implicitWidth: root.contentItem.children.reduce((prev, child) => Math.max(prev, child.width), 0)
|
||||
implicitHeight: root.contentItem.children.reduce((prev, child) => prev + child.height, 0)
|
||||
anchors.fill: parent
|
||||
color: Theme.palette.base200
|
||||
radius: 8
|
||||
}
|
||||
|
|
@ -78,7 +78,11 @@ Variants {
|
|||
Launcher {}
|
||||
Pomodoro {}
|
||||
PowerMenu {}
|
||||
Storybook {}
|
||||
Storybook {
|
||||
anchor.window: topWindow
|
||||
anchor.rect.x: topWindow.width / 2 - width / 2
|
||||
anchor.rect.y: topWindow.height / 4
|
||||
}
|
||||
Drawers {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ import qs.components
|
|||
import qs.config
|
||||
import qs.constants
|
||||
import qs.services
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Wayland
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
|
@ -14,24 +12,6 @@ StyledPopupWindow {
|
|||
id: root
|
||||
|
||||
visible: Visibility.storybook
|
||||
implicitWidth: rect.width
|
||||
implicitHeight: rect.height
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
WlrLayershell.keyboardFocus: root.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
|
||||
HyprlandFocusGrab {
|
||||
active: Visibility.storybook
|
||||
windows: [root]
|
||||
onCleared: {
|
||||
Visibility.storybook = false;
|
||||
}
|
||||
}
|
||||
|
||||
StyledWrapperRectangle {
|
||||
id: rect
|
||||
|
||||
margin: 48
|
||||
|
||||
GridLayout {
|
||||
id: grid
|
||||
|
|
@ -196,7 +176,6 @@ StyledPopupWindow {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledDrawer {
|
||||
id: drawer
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue