[RFC] [Active Window Control] Allow global menu be left alligned with buttons on right
Needs ReviewPublic

Authored by Pitel on Mon, Mar 5, 8:45 PM.


Group Reviewers

Currently global menu is always aligned on the other side than buttons (minimize / maximize / close) are.
This patch tries to make alignment of global menu independent.

It fails for some setups -- e.g. the left margin of window label is too large:

I tried hard to find a better solution but failed so far.

Any suggestions are welcome.

Diff Detail

R884 Active Window Control Applet for Plasma
Lint Skipped
Unit Tests Skipped
Pitel created this revision.Mon, Mar 5, 8:45 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMon, Mar 5, 8:45 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
Pitel requested review of this revision.Mon, Mar 5, 8:45 PM

Thanks for taking the time to think about this.

The number of settings (and their inconsistencies) are actually a big pain of this project. I'd like to rework it from the ground up. So if I may, I'd like to postpone your patch. When I'm finished with the planned rework I'll definitely add your use-case into account.

I'd actually like to present my point of view here so we can discuss if it is a good idea or not:

I'm proposing to have a bunch of standalone items with some common placement settings. The items are:

  • icon
  • text
  • window buttons
  • appmenu

Mentioned items would be placeable by drag-drop in settings like window buttons are already.

Each item would have following settings in common:

  • occupying | floating
  • horizontal alignment: left | right

Window text and appmenu would additionally have:

  • fill width
  • fill height (default: true)

Appmenu and buttons would additionaly have:

  • height
  • vertical alignment: top | bottom | center
  • hide on mouse out

Of course there will still be specific settings for the items like window title eliding etc.

I also plan to create some presets like:

  1. Unity (Ubuntu style)
  2. Thick (thick panel with floating and disappearing menu and buttons over icon and title)
  3. One Liner (from the left: buttons, icon, window text, appmenu)

Any opinions are appreciated :).

Pitel added a comment.Wed, Mar 7, 7:47 AM

The patch definitely can wait until you finish the rework. A few thoughts that crossed my mind when reading proposed changes:

  • I really like the standalone basic items placed by drag and drop.
  • Is floating really floating or just another layer of occupying? E.g. thick panel and on bottom appmenu (on left) and buttons (on right) (floating because they are over window label -- or this option going away?): would the appmenu elide [1] or be drawn over the buttons? (Note: I'm not saying this should be a supported use-case, just playing with possible setups in my mind and the floating is really floating would be much easier to implement.)
  • To support my use-case #2 all items should have
    • show on: mouse out | mouse in | always (and possibly never show unless it is covered by other options, show on mouse out not available for buttons and appmenu)
    • checkbox to restrict mouse area used by "show on" option only to rect occupied by given item (for the in-parenthesis part of use-case #2)
  • Some predefined presents are a great idea -- do you intent to support saving current setup as a present?
  • All around the rework looks like a big improvement.

The use-cases I am most interested in are:

  • One Liner with buttons on right
  • The previous one but with appmenu shown only on mouse-in and window text only on mouse-out (and preferably the mouse events should be restricted to area between icon and buttons -- i.e. if i click buttons window text is shown). This is better than One Liner setups for small screens.

[1] I think this is an important feature, I tried implementing it in D11073. I must say I am surprised that there is no ElidingGridLayout or something -- the patch tries to emulate it, but without touching internal positioning code of the layout it will always be a hack... (Also why is the backend plugin private?)