diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-10 13:37:34 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-10 13:37:34 +1000 |
| commit | 6222f969d4e641582544c90053a1fc6fc61da338 (patch) | |
| tree | 56666f952e712717443b0223b81cc7275aa0acd4 /modules/drawers/Interactions.qml | |
| parent | feat: drag launcher to open/close (diff) | |
| download | caelestia-shell-6222f969d4e641582544c90053a1fc6fc61da338.tar.gz caelestia-shell-6222f969d4e641582544c90053a1fc6fc61da338.tar.bz2 caelestia-shell-6222f969d4e641582544c90053a1fc6fc61da338.zip | |
feat: non persistent bar option
Diffstat (limited to 'modules/drawers/Interactions.qml')
| -rw-r--r-- | modules/drawers/Interactions.qml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 0a00219..9c9aeb3 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -60,6 +60,9 @@ MouseArea { visibilities.utilities = false; } popouts.hasCurrent = false; + + if (bar.isHovered && Config.bar.showOnHover) + visibilities.bar = false; } } @@ -67,6 +70,23 @@ MouseArea { const x = event.x; const y = event.y; + // Show bar in non-exclusive mode on hover + if (!visibilities.bar && Config.bar.showOnHover && x < bar.implicitWidth) { + visibilities.bar = true; + bar.isHovered = true; + } + + // Show/hide bar on drag + if (pressed && dragStart.x < bar.implicitWidth) { + const dragX = x - dragStart.x; + if (dragX > Config.bar.dragThreshold) { + visibilities.bar = true; + bar.isHovered = false; + } else if (!bar.isHovered && dragX < -Config.bar.dragThreshold) { + visibilities.bar = false; + } + } + // Show osd on hover const showOsd = inRightPanel(panels.osd, x, y); |