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/Interactions.qml | |
| 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/Interactions.qml')
| -rw-r--r-- | modules/drawers/Interactions.qml | 7 |
1 files changed, 3 insertions, 4 deletions
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; |