diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-02 16:31:26 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-02 16:31:26 +0800 |
| commit | 24a3da813862623b3eec05ef5050ba715e08c684 (patch) | |
| tree | 1674c1be77e48befe6e877b421f799deca6c4475 /modules/drawers | |
| parent | osd: fix text not updating during transition (diff) | |
| download | caelestia-shell-24a3da813862623b3eec05ef5050ba715e08c684.tar.gz caelestia-shell-24a3da813862623b3eec05ef5050ba715e08c684.tar.bz2 caelestia-shell-24a3da813862623b3eec05ef5050ba715e08c684.zip | |
feat: bar popouts
Create active window popout
Diffstat (limited to 'modules/drawers')
| -rw-r--r-- | modules/drawers/Backgrounds.qml | 8 | ||||
| -rw-r--r-- | modules/drawers/Interactions.qml | 13 | ||||
| -rw-r--r-- | modules/drawers/Panels.qml | 12 |
3 files changed, 33 insertions, 0 deletions
diff --git a/modules/drawers/Backgrounds.qml b/modules/drawers/Backgrounds.qml index a78c667..d4ea1d7 100644 --- a/modules/drawers/Backgrounds.qml +++ b/modules/drawers/Backgrounds.qml @@ -5,6 +5,7 @@ import "root:/modules/notifications" as Notifications import "root:/modules/session" as Session import "root:/modules/launcher" as Launcher import "root:/modules/dashboard" as Dashboard +import "root:/modules/bar/popouts" as BarPopouts import QtQuick.Shapes Shape { @@ -51,4 +52,11 @@ Shape { startX: (root.width - wrapper.width) / 2 startY: 0 } + + BarPopouts.Background { + wrapper: panels.popouts + + startX: 0 + startY: wrapper.y + } } diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index cd09140..03c4e5e 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -37,6 +37,7 @@ MouseArea { visibilities.osd = false; osdHovered = false; visibilities.dashboard = false; + Popouts.hasCurrent = false; } } @@ -58,6 +59,18 @@ MouseArea { // Show dashboard on hover const showDashboard = root.inTopPanel(panels.dashboard, x, y); visibilities.dashboard = showDashboard; + + // Show popouts on hover + const popout = panels.popouts; + if (x < BorderConfig.thickness + popout.width) { + if (x < BorderConfig.thickness) + // Handle like part of bar + Visibilities.bars[screen].checkPopout(y); + else + // Keep on hover + Popouts.hasCurrent = withinPanelHeight(popout, x, y); + } else + Popouts.hasCurrent = false; } Osd.Interactions { diff --git a/modules/drawers/Panels.qml b/modules/drawers/Panels.qml index 5ea7e83..844a719 100644 --- a/modules/drawers/Panels.qml +++ b/modules/drawers/Panels.qml @@ -5,6 +5,7 @@ import "root:/modules/notifications" as Notifications import "root:/modules/session" as Session import "root:/modules/launcher" as Launcher import "root:/modules/dashboard" as Dashboard +import "root:/modules/bar/popouts" as BarPopouts import Quickshell import QtQuick @@ -19,6 +20,7 @@ Item { readonly property Session.Wrapper session: session readonly property Launcher.Wrapper launcher: launcher readonly property Dashboard.Wrapper dashboard: dashboard + readonly property BarPopouts.Wrapper popouts: popouts anchors.fill: parent anchors.margins: BorderConfig.thickness @@ -70,4 +72,14 @@ Item { anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top } + + BarPopouts.Wrapper { + id: popouts + + screen: root.screen + + anchors.left: parent.left + anchors.verticalCenter: parent.top + anchors.verticalCenterOffset: Popouts.currentCenter - BorderConfig.thickness + } } |