Bug 435739 - pin a widget in the center of the panel, even in the presence of widgets of variable size on both sides
Summary: pin a widget in the center of the panel, even in the presence of widgets of v...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (other bugs)
Version First Reported In: master
Platform: Kubuntu Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-14 20:57 UTC by Federico Calzoni
Modified: 2021-04-15 18:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Calzoni 2021-04-14 20:57:26 UTC
SUMMARY
In the presence of widgets with variable dimensions on both sides of the panel, it seems impossible to fix the position of a third widget exactly in the center: when one of the two widgets on the sides changes size, the widget in the center moves.

STEPS TO REPRODUCE
1. add a new empty panel (in my case in the top border), add 2 widget of variable dimension, (like Global Menu, active window control, window app menu, or window buttons). In my case I have "Global menù" on the left corner and "window button" on the right (about window button, from the widget settings I have set it to disappear when the window is not maximized).

2. insert a third widget, in the center (in my case Digital clock)

3. add 2 spacer, one on each side: one to the left of the clock, and one to the right.
if the spacers are flexible in size, we notice that when one of the widgets at the edges changes size (changing window in the case of the global menu or maximizing a window in the case of Window Button), the clock moves a little.
if I set one of the two spacers to a fixed size or both to a fixed size I get worse results.

OBSERVED RESULT
The widget placed in the center moves with the change in size of the widgets at the edges, and it is not always centered in the center of the panel.

EXPECTED RESULT
The widget placed in the center remains fixed and exactly centered even if the size of the widgets at the edges changes.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Kernel Version: 5.8.0-49-generic
OS Type: 64-bit
Comment 1 Nate Graham 2021-04-15 18:04:08 UTC
Plasma 5.20 introduced a better spacer that works exactly how you want. :)