diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-17 00:44:00 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-17 00:44:00 +0800 |
| commit | 6e6db08726e3bc274594de6835a01fc10002def9 (patch) | |
| tree | 272dcaa27b96690c449cdf61c8e4e6ea21559f48 /modules/drawers/Interactions.qml | |
| parent | launcher: fallback app icon (diff) | |
| download | caelestia-shell-6e6db08726e3bc274594de6835a01fc10002def9.tar.gz caelestia-shell-6e6db08726e3bc274594de6835a01fc10002def9.tar.bz2 caelestia-shell-6e6db08726e3bc274594de6835a01fc10002def9.zip | |
feat: dashboard
Diffstat (limited to 'modules/drawers/Interactions.qml')
| -rw-r--r-- | modules/drawers/Interactions.qml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index e937326..0dfda50 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -21,6 +21,10 @@ MouseArea { function inRightPanel(panel: Item, x: real, y: real): bool { return x > BorderConfig.thickness + panel.x && withinPanelHeight(panel, x, y); } + + function inTopPanel(panel: Item, x: real, y: real): bool { + const panelX = BorderConfig.thickness + panel.x; + return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX && x <= panelX + panel.width; } anchors.fill: parent @@ -50,6 +54,9 @@ MouseArea { else if (dragX > SessionConfig.dragThreshold) root.visibilities.session = false; } + + const showDashboard = root.inTopPanel(panels.dashboard, x, y); + root.visibilities.dashboard = showDashboard; } } |