diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 18:41:45 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 18:41:45 +1000 |
| commit | 023d00d6584d7af9d344ed39031f3b4bf95521d0 (patch) | |
| tree | 331b7b8876e6cb7e7e9956ca8f12dd89bdda85fe /modules/drawers | |
| parent | bar: show power profile if no battery (diff) | |
| download | caelestia-shell-023d00d6584d7af9d344ed39031f3b4bf95521d0.tar.gz caelestia-shell-023d00d6584d7af9d344ed39031f3b4bf95521d0.tar.bz2 caelestia-shell-023d00d6584d7af9d344ed39031f3b4bf95521d0.zip | |
drawers: fix interaction areas
Outer corners shouldn't be part of interaction area
Diffstat (limited to 'modules/drawers')
| -rw-r--r-- | modules/drawers/Backgrounds.qml | 10 | ||||
| -rw-r--r-- | modules/drawers/Interactions.qml | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/modules/drawers/Backgrounds.qml b/modules/drawers/Backgrounds.qml index 3dcc8ad..c6628ae 100644 --- a/modules/drawers/Backgrounds.qml +++ b/modules/drawers/Backgrounds.qml @@ -22,7 +22,7 @@ Shape { wrapper: panels.osd startX: root.width - panels.session.width - startY: (root.height - wrapper.height) / 2 + startY: (root.height - wrapper.height) / 2 - rounding } Notifications.Background { @@ -36,20 +36,20 @@ Shape { wrapper: panels.session startX: root.width - startY: (root.height - wrapper.height) / 2 + startY: (root.height - wrapper.height) / 2 - rounding } Launcher.Background { wrapper: panels.launcher - startX: (root.width - wrapper.width) / 2 + startX: (root.width - wrapper.width) / 2 - rounding startY: root.height } Dashboard.Background { wrapper: panels.dashboard - startX: (root.width - wrapper.width) / 2 + startX: (root.width - wrapper.width) / 2 - rounding startY: 0 } @@ -58,6 +58,6 @@ Shape { invertBottomRounding: wrapper.y + wrapper.height - BorderConfig.rounding >= root.height startX: 0 - startY: wrapper.y + startY: wrapper.y - rounding } } diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 03c4e5e..42e423d 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -16,7 +16,7 @@ MouseArea { function withinPanelHeight(panel: Item, x: real, y: real): bool { const panelY = BorderConfig.thickness + panel.y; - return y >= panelY && y <= panelY + panel.height; + return y >= panelY - BorderConfig.rounding && y <= panelY + panel.height + BorderConfig.rounding; } function inRightPanel(panel: Item, x: real, y: real): bool { @@ -25,7 +25,7 @@ MouseArea { 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; + return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX - BorderConfig.rounding && x <= panelX + panel.width + BorderConfig.rounding; } anchors.fill: parent @@ -57,8 +57,7 @@ MouseArea { } // Show dashboard on hover - const showDashboard = root.inTopPanel(panels.dashboard, x, y); - visibilities.dashboard = showDashboard; + visibilities.dashboard = inTopPanel(panels.dashboard, x, y); // Show popouts on hover const popout = panels.popouts; |