Make task mananger applet use only space it needs and not eat more -- it looks
better with global menu in same the panel.
Maybe convert this to configuration option?
Lint Skipped |
Unit Tests Skipped |
A highly user-visible change like this needs at the minimum:
i think it makes sense in theory, but to be:
Choice whether to fill or not fill width was turned into config option and i possible to set (and used) only for iconsOnly
version of taskmanager.
Screenshot with original behavior:
Your before-and-after screenshots suggest that the undesirable behavior is more an issue with the Global Menu widget not taking enough space for itself when other widgets can be reduced in size without hiding any content.
Not really -- if I understand correctly allocating space works following way: All widgets get space they claim they need and the surplus is split among widgets with fillWidth == true in ratio which seems proportinal to width of given widgets. So even if global menu took space needed to display all menu items there still would be an ugly gap on right side of taskmanager.
As a side note: hiding part of menu is not really an usability issue because the global menu applet is able show rest of it as a dropdown menu which is a patch yet to be upstreamed and I guess I also should port it to Global Menu applet (I am using Active Window Control applet which also shows name of app and buttuns to close /min / max window).
Screenshots with Global Menu applet (panel contains Global menu, growing Spacer and icon taskmanager).
Old:
New:
In previous revisions I used fillWidth = false but it is wrong because it not only prevents expanding but also it prevents applet from shrinking. So use Layout.maximumWidth = Layout.preferredWidth instead. Also after further testing I do not think the option must be restricted to icon version of applet only -- with full version (and Spacer applet) it allows you to align task on right side of panel which was impossible before.
Note: By default the new "fillWidth" option is enabled, so no behaviour changes until user explicitly configures the applet.
Ping. The current version adds a configuration option fillWidth (enabled by default) which allows the applet to grow beyond its preferred size. I tested it in usual setup and with fillWidth enabled the behavior is unchanged.
I'm not going to accept the patch as is, sorry - to me this is littering applets with config options that should be handled generically at the containment level instead. I had a brief chat with Marco Martin about this last week and he agreed as well and I think was going to look into it.
I understand you do not like adding options that you do not like adding options adjust think which should be configured on another level. But to be able to configure filling empty space at level of panel applets must not claim they need more space than they really do (and now taskmanager is doing exactly that). So possible solutions I see are:
I believe the last option is the worst by far.
The applet basically exports "this is the space I need at a minimum" and "give me all you got". What I'm saying is that there should be a containment-level option to override the latter and disable fillWidth for the applet. fillWidth is a hint, not a guarantee, and it's up to the containment to grant it or not.
Ahh sorry I misunderstood you. Moving this option to containment level seems reasonable although I'm not sure for how many other applets it might be useful -- except taskbar and Active Windows Control (the global menu applet in my screen shot and it already has this option) all applets I use are fixed width.