"Center Widget" feature for plasma panels
Closed, ResolvedPublic

Description

A recurring user request is to be able to have a widget in the plasma panel which is always exactly centered (as a reference, the Clock of Gnome3, recurring request for the taskbar as well)

Right now is possible to approximate this with spacers in the plasma panels, but is not possible to actually ensure that the applet wil lalways be exactly centered, as this depends from the space that widgets on the left or on the right will take.
Latte dock has an approach of having 2 spacers always present in the panel (they can't be neither added nor removed) tough this causes some ui problems: it makes impossible for applets to actually take all the available space anymore, and is a quite weird UI.

mart created this task.Jan 27 2020, 4:01 PM

I think this makes sense, yeah. The GNOME3-style clock is a good use case.

Presenting it intuitively in the UI does seem tricky though. We have the same problem in QWidget app toolbars where you can kinda-sorta center a group of toolbar buttons by putting expanding spacers on either side of it, but then the group is no longer centered if you add things on one of the sides.

Perhaps if an item has expanding spacers in either side of it, and this results in it appearing in the center 1/6 of the panel, it can automatically detect that the user might be trying to center it in the panel and enforce this?

ngraham closed this task as Resolved.May 15 2021, 1:41 AM
ngraham moved this task from Backlog/Planned to Done on the VDG board.
ngraham claimed this task.

We have this now! Marco implemented it for Plasma 5.20 IIRC.