[taskmanager applet] Do not fill width
AbandonedPublic

Authored by Pitel on Mar 1 2018, 2:46 PM.

Details

Reviewers
ngraham
mart
Summary

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?

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
Pitel created this revision.Mar 1 2018, 2:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 1 2018, 2:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
Pitel requested review of this revision.Mar 1 2018, 2:46 PM
ngraham requested changes to this revision.Mar 1 2018, 2:49 PM
ngraham added a subscriber: ngraham.

A highly user-visible change like this needs at the minimum:

  • Before-and-after screenshots that illustrate the problem
  • Evidence of testing for common scenarios to make sure that there are no regressions
This revision now requires changes to proceed.Mar 1 2018, 2:49 PM
mart requested changes to this revision.Mar 1 2018, 2:52 PM
mart added a subscriber: mart.

i think it makes sense in theory, but to be:

  • an option, default off (switching trough the alternatives menu between the two taskbars would break the panel otherwise)
  • available *only* for icons-only task manager, the normal taskbar needs all the space it can get to correctly determine whether to draw the text, elide it, or icon only
Pitel edited the summary of this revision. (Show Details)Mar 1 2018, 2:58 PM
Pitel updated this revision to Diff 28345.Mar 1 2018, 5:06 PM

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:


And new one:

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.

Pitel added a comment.Mar 1 2018, 5:45 PM

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).

Pitel added a comment.Mar 2 2018, 10:35 AM

Screenshots with Global Menu applet (panel contains Global menu, growing Spacer and icon taskmanager).

Old:

New:

Pitel updated this revision to Diff 28405.Mar 2 2018, 2:09 PM

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.

Pitel added a comment.Mar 13 2018, 9:15 PM

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.

hein added a subscriber: hein.Mar 14 2018, 11:00 AM

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:

  • Always limit taskmanager to needed space only (i.e. set maximumWidth: preferredWidth): The best solution from technical point of view, lets you config filling empty space by adding expanding spacers into panel but it breaks existing setups which is highly undesirable as I understood from previous comments.
  • Add config option as proposed by this patch: It enables the desired behavior without breaking existing setups, but adds a bit non-systematic config option.
  • Do nothing: Taskmanager will keep eating all space and and some reasonable setups will be impossible to achieve.

I believe the last option is the worst by far.

hein added a comment.Mar 14 2018, 11:50 AM

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.

Pitel abandoned this revision.Mar 17 2018, 10:35 AM

Replaced by D11410.