diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-07 14:47:24 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-07 14:47:24 +1000 |
| commit | e3dcdbb67cba35d90fbf5d437466d11776fe8412 (patch) | |
| tree | 192e3787eb1ab45463cb27b35c595466912da4ed /modules/drawers/Interactions.qml | |
| parent | dashboard: make own swipeview impl (diff) | |
| download | caelestia-shell-e3dcdbb67cba35d90fbf5d437466d11776fe8412.tar.gz caelestia-shell-e3dcdbb67cba35d90fbf5d437466d11776fe8412.tar.bz2 caelestia-shell-e3dcdbb67cba35d90fbf5d437466d11776fe8412.zip | |
internal: move bar to drawer window
Fixes a few bugs, also removes need for hyprland order layerrule
Diffstat (limited to 'modules/drawers/Interactions.qml')
| -rw-r--r-- | modules/drawers/Interactions.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 42e423d..e66c24d 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -10,6 +10,7 @@ MouseArea { required property ShellScreen screen required property PersistentProperties visibilities required property Panels panels + required property Item bar property bool osdHovered property point dragStart @@ -20,11 +21,11 @@ MouseArea { } function inRightPanel(panel: Item, x: real, y: real): bool { - return x > BorderConfig.thickness + panel.x && withinPanelHeight(panel, x, y); + return x > bar.implicitWidth + panel.x && withinPanelHeight(panel, x, y); } function inTopPanel(panel: Item, x: real, y: real): bool { - const panelX = BorderConfig.thickness + panel.x; + const panelX = bar.implicitWidth + panel.x; return y < BorderConfig.thickness + panel.y + panel.height && x >= panelX - BorderConfig.rounding && x <= panelX + panel.width + BorderConfig.rounding; } @@ -61,10 +62,10 @@ MouseArea { // Show popouts on hover const popout = panels.popouts; - if (x < BorderConfig.thickness + popout.width) { - if (x < BorderConfig.thickness) + if (x < bar.implicitWidth + popout.width) { + if (x < bar.implicitWidth) // Handle like part of bar - Visibilities.bars[screen].checkPopout(y); + bar.checkPopout(y); else // Keep on hover Popouts.hasCurrent = withinPanelHeight(popout, x, y); |