Bug 489793

Summary: Feature request: Panel spacer sizing with weights
Product: [Plasma] plasmashell Reporter: Gergely HORVÁTH <horvathg.1988>
Component: Panel Spacer widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: cwo.kde, nate
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gergely HORVÁTH 2024-07-05 16:36:21 UTC
Currently there is no way to calibrate the spacer. I throw in two and one is waaaaaay larger than the other. I guess there is some kind of spring force in action. Is it possible to make it configurable? I have something easy to understand in mind, spring force (or some more clever named variable) should be a positive number, even integers are fine, and the empty space is distributed between the spacers according to their relative spring force.
Example having two spacers:
- setting both spring force value to 1 mean the spacers are the same size no matter what (centering the content between them, with respect to the outer margins)
- setting them 2 and 1 will mean that the first one is always twice as long as the other.
I'm nut sure what is the current setup but it may help with aligning interesting setups.

Thanks if you take a look into it and as always, keep up the great work!
Comment 1 Nate Graham 2024-09-20 00:42:47 UTC
The idea behind flexible spacers right now is that they can center something in the middle of a panel. This necessitates that they be allowed to have different sizes. If you don't want this behavior, you can give them fixed sizes. Anything beyond that is probably too complex to be comprehensible, sorry.
Comment 2 Gergely HORVÁTH 2024-09-22 11:54:31 UTC
I see, thanks for the answer!