Bug 478691 - Distance at which Panel dodges windows is double the distance it needs to be
Summary: Distance at which Panel dodges windows is double the distance it needs to be
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR minor
Target Milestone: 1.0
Assignee: Niccolò Venerandi
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-18 16:20 UTC by Nate Graham
Modified: 2024-01-04 21:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Dodge distance (91.25 KB, image/jpeg)
2023-12-18 19:10 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-12-18 16:20:55 UTC
See attached screenshot. If I move the window one pixel farther to the left, the Panel will dodge it and become hidden. As a result, the visual margin between the window and the Panel is double the visual margin between the Panel and the screen edges. The Panel should dodge at a closer distance.

See the related discussion in https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1813#note_807073.
Comment 1 fanzhuyifan 2023-12-18 18:19:06 UTC
(In reply to Nate Graham from comment #0)
> See attached screenshot. If I move the window one pixel farther to the left,
> the Panel will dodge it and become hidden. As a result, the visual margin
> between the window and the Panel is double the visual margin between the
> Panel and the screen edges. The Panel should dodge at a closer distance.
> 
> See the related discussion in
> https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/
> 1813#note_807073.

The attached screenshot seems to be missing
Comment 2 Nate Graham 2023-12-18 19:10:13 UTC
Created attachment 164278 [details]
Dodge distance

It is indeed, oops. Attached now!
Comment 3 fanzhuyifan 2023-12-18 20:23:38 UTC
I am not sure what the intended behavior is here, since even when the panel is not floating, it starts to hide when there is a gap.... The window doesn't need to touch it for it to start hiding. Are there any design specifications agreed upon by the visual design team?
Comment 4 Nate Graham 2023-12-20 20:19:56 UTC
Yes, there has to be *some* gap, but the gap is now twice what the intention was when this feature was originally designed.
Comment 5 Niccolò Venerandi 2023-12-21 22:16:16 UTC
To be clear, the gap being like this was 100% intentional, it's not double or anything; it's floating margin + ~12px. This is because that's the minimum gap before windows snap to the panel, and using less than that caused issues for the floating panel de-float. I used the same gap for the dodge behaviour for consistency purposes, but I can just use a different gap (e.g. 0px).
Comment 6 Bug Janitor Service 2023-12-22 12:10:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1944
Comment 7 Nate Graham 2024-01-04 21:16:45 UTC
Git commit d5a7cebc032e700769d09d2f0bffb526c0c93c99 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 04/01/2024 at 22:10.
Pushed by ngraham into branch 'master'.

Only dodge windows when they overlap the panel

M  +9    -1    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/d5a7cebc032e700769d09d2f0bffb526c0c93c99