Bug 455323 - Ugly margins around de-floated floating panel with any maximized windows
Summary: Ugly margins around de-floated floating panel with any maximized windows
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: 5.25.0
Platform: Neon Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-15 11:53 UTC by Adrián
Modified: 2023-11-05 15:05 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments
Floating panel without maximized windows. (10.45 KB, image/png)
2022-06-15 11:55 UTC, Adrián
Details
Floating panel with maximized window. (7.85 KB, image/png)
2022-06-15 11:55 UTC, Adrián
Details
de-floating broken for top panel (44.42 KB, image/png)
2022-10-25 21:43 UTC, Natalie Clarius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrián 2022-06-15 11:53:13 UTC
SUMMARY
When you activate the floating panel, it leaves a space on its edges respecting the selected panel height. But when you maximize a window, instead of going back to a normal state, it increases the size of the panel, without altering anything inside it, leaving a huge panel that doesn't respect the selected size.


STEPS TO REPRODUCE
1. Activate floating panel.
2. Maximize a window.

OBSERVED RESULT
Panel does not respect the selected height, increasing its size, leaving the rest of the widgets as they are.

EXPECTED RESULT
Panel eliminates the borders, remaining as a normal panel, respecting the chosen height.
Comment 1 Adrián 2022-06-15 11:55:04 UTC
Created attachment 149736 [details]
Floating panel without maximized windows.
Comment 2 Adrián 2022-06-15 11:55:28 UTC
Created attachment 149737 [details]
Floating panel with maximized window.
Comment 3 Niccolò Venerandi 2022-06-15 11:55:59 UTC
Going back to a normal state would require dynamically change the size of the panel window every time a window is maximized. If I recall correctly, this wasn't quite feasible...
Comment 4 Adrián 2022-06-15 12:03:13 UTC
(In reply to Niccolò Venerandi from comment #3)
> Going back to a normal state would require dynamically change the size of
> the panel window every time a window is maximized. If I recall correctly,
> this wasn't quite feasible...

It is still an unexpected behavior and it does not respect the height of the panel. In counterpart Latte also has the option of having a floating panel and maintains the desired size.
I think the initiative is great, but it is something that should be corrected.
Comment 5 Adrián 2022-06-15 12:05:36 UTC
As an alternative, the panel should still have the space, without increasing its size. It's not perfect, but it's better than what we currently have.
Comment 6 Nate Graham 2022-06-15 16:41:37 UTC
Yes, we've gotten other comments saying that it should just not de-float at all when there are maximized windows. See Bug 454950.
Comment 7 Adrián 2022-06-15 17:14:24 UTC
(In reply to Nate Graham from comment #6)
> Yes, we've gotten other comments saying that it should just not de-float at
> all when there are maximized windows. See Bug 454950.

The difference is that there it asks to make it similar to a dock, when I am reporting that it does not respect the height of the panel when maximizing a window. Similar but not the same. I gave the second option of leaving it floating because of the comment that it would be impossible to maintain the size.
Comment 8 Niccolò Venerandi 2022-06-15 18:06:27 UTC
I will investigate whether this can be addressed by a more natural de-float or not as soon as I have more time; I'll admit I don't remember exactly why I hadn't implemented it, but I recall I attempted and had a good reason not to.

Making the panel not de-float at all is of course an option, though not one that I'd be a great fan of.
Comment 9 Adrián 2022-06-15 18:12:58 UTC
(In reply to Niccolò Venerandi from comment #8)
> I will investigate whether this can be addressed by a more natural de-float
> or not as soon as I have more time; I'll admit I don't remember exactly why
> I hadn't implemented it, but I recall I attempted and had a good reason not
> to.
> 
> Making the panel not de-float at all is of course an option, though not one
> that I'd be a great fan of.

Bug 454950 suggests floating when certain options are enabled, so you can use it as a dock. It is an interesting option, but I consider that fixing the current problem is more important.
Comment 10 tealdislike 2022-07-05 13:22:47 UTC
(In reply to Niccolò Venerandi from comment #3)
> Going back to a normal state would require dynamically change the size of
> the panel window every time a window is maximized. If I recall correctly,
> this wasn't quite feasible...

Maybe the panel could move downwards and at the same time add padding to the left and right sides. That way panel is the same height and size.
Comment 11 Bug Janitor Service 2022-10-15 15:55:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1206
Comment 12 Nate Graham 2022-10-25 14:53:09 UTC
Git commit ed0214057e7ae78bedc4486a6344db9459ce5570 by Nate Graham, on behalf of Niccolò Venerandi.
Committed on 25/10/2022 at 14:52.
Pushed by ngraham into branch 'master'.

Panel: when floating, de-float when window touches it

A floating Panel now de-floats and becomes opaque whenever a window touches it.
This also allows for a thinner Panel when a window is maximized (a normal Panel
is 44 px; before this patch a de-floated one was 60, now it's 52px) and that should
allay complaints about excessive margins).
Related: bug 455538, bug 455483
FIXED-IN: 5.27

M  +29   -6    desktoppackage/contents/views/Panel.qml

https://invent.kde.org/plasma/plasma-desktop/commit/ed0214057e7ae78bedc4486a6344db9459ce5570
Comment 13 Adrián 2022-10-25 15:03:19 UTC
(In reply to Nate Graham from comment #12)
> Git commit ed0214057e7ae78bedc4486a6344db9459ce5570 by Nate Graham, on
> behalf of Niccolò Venerandi.
> Committed on 25/10/2022 at 14:52.
> Pushed by ngraham into branch 'master'.
> 
> Panel: when floating, de-float when window touches it
> 
> A floating Panel now de-floats and becomes opaque whenever a window touches
> it.
> This also allows for a thinner Panel when a window is maximized (a normal
> Panel
> is 44 px; before this patch a de-floated one was 60, now it's 52px) and that
> should
> allay complaints about excessive margins).
> Related: bug 455538, bug 455483
> FIXED-IN: 5.27
> 
> M  +29   -6    desktoppackage/contents/views/Panel.qml
> 
> https://invent.kde.org/plasma/plasma-desktop/commit/
> ed0214057e7ae78bedc4486a6344db9459ce5570

I don't see how that solves it when it has only removed 8px of the 16px that the fix itself says it had. It's an improvement, sure, but I don't see how it's a solution to the bug. 1+1=3 is a better answer than 5, but it's still not the answer.
Comment 14 Nate Graham 2022-10-25 16:49:51 UTC
According to Niccolò, this is the best we can do for now; removing the margins completely is extremely technically challenging and might not work.

The current state with that commit applied brings us back to the margins that the Task Manager used for years and years, before we got rid of them. So it's no worse than that, at least. Let's be happy with this for now, and hope Niccolò finds a way to remove the margins completely. :)
Comment 15 Adrián 2022-10-25 17:10:39 UTC
(In reply to Nate Graham from comment #14)
> According to Niccolò, this is the best we can do for now; removing the
> margins completely is extremely technically challenging and might not work.
> 
> The current state with that commit applied brings us back to the margins
> that the Task Manager used for years and years, before we got rid of them.
> So it's no worse than that, at least. Let's be happy with this for now, and
> hope Niccolò finds a way to remove the margins completely. :)

I get that, but why tag it as fixed when it hasn't really been fixed yet? It does not seem right.
The bug report is very clear, the panel does not respect the selected size, and reducing only 8 px is not enough to "shut us up". As hard as it is to fix, the current implementation makes it unusable for me and I don't accept being labeled as fixed when it clearly isn't.
Comment 16 Nate Graham 2022-10-25 17:24:46 UTC
Sometimes life is messy. I guess I can mark it as RESOLVED INTENTIONAL to reflect that an ideal fix isn't possible right now, if it will make you feel better.
Comment 17 Natalie Clarius 2022-10-25 21:43:50 UTC
Created attachment 153207 [details]
de-floating broken for top panel
Comment 18 Natalie Clarius 2022-10-25 21:44:41 UTC
Now de-floating is broken for top panels. With the recent fix applied, I get gaps on the top, left and right when a window is maximized.
Comment 19 Natalie Clarius 2022-10-25 21:46:05 UTC
The panel also does not become opaque.
Comment 20 Natalie Clarius 2022-10-26 02:35:25 UTC
Looks fine now, probably I didn't have the recent enough build of plasma-workspace that had the other needed commit. Sorry for the noise!
Comment 21 Prajna Sariputra 2023-11-05 15:05:03 UTC
So with Plasma 6.0 the situation has been further improved, now the de-floated panel is the same height as it would be if floating isn't enabled at all. The panel does still add extra margins on the side, so while the issue stated in the title isn't resolved the main problem as per the description and comments (the height) is actually fixed, plus unlike the height the extra side margins don't take away space from apps anyway.

I do still think that it would be great if the side margins could also be removed when de-floating, but that's certainly more of a "wishlist" thing than the height problem, so thanks for the great work!