kotelnik / plasma-applet-active-window-control

Plasma 5 applet for controlling currently active window.
GNU General Public License v2.0
119 stars 18 forks source link

Feature request: please consider adding options to hide window title and to show global menu on mouse hover #50

Closed amorozov closed 7 years ago

amorozov commented 7 years ago

Might I suggest a a behavior change like this:

  1. When the mouse pointer is within a (maximized) window main area, the applet dispays window title (and main icon)
  2. When the pointer enters the applet area, window title hides and button and application menus are displayed.

Reasoning: when the pointer is kept outside the applet area, the user doesn't plan to push buttons and menu items. And vice versa: when the pointer hovers the applet the user wishes to push some of the buttons.

Displaying both window title and menu items isn't a good idea due to greater space demand (check for example KDevelop with a file opened in a project)

kotelnik commented 7 years ago

I thought that hiding title is already happening on mouse hover. At least if you didn't check "Show next to icon and text" checkbox. Or maybe you mean a different scenario?

amorozov commented 7 years ago

Well, if I uncheck 'Show next to icon and text' checkbox in the appmenu configuration tab, I get a plain mess :-) As of v1.7.0-4-g277bc31 menu items are drawn over the tilte, as in the screenshot: screenshot

If I understand correctly, here's the part of the plasma configuration file related to the applet:

[Containments][36][Applets][64]
immutability=1
plugin=org.kde.activeWindowControl

[Containments][36][Applets][64][Configuration][AppMenu]
appmenuEnabled=true
appmenuFillHeight=true
appmenuIconAndTextOpacity=1
appmenuNextToButtons=true
appmenuOuterSideMargin=3
appmenuSwitchSidesWithIconAndText=true

[Containments][36][Applets][64][Configuration][Appearance]
autoFillWidth=true
buttonOrder=close|minimize|maximize|pin
buttonSize=1
buttonsStandalone=true
buttonsVerticalCenter=true
showButtonOnlyWhenMaximized=true
showMaximize=true
showMinimize=true
showPinToAllDesktops=true
slidingIconAndText=true

[Containments][36][Applets][64][Configuration][ConfigDialog]
DialogHeight=645
DialogWidth=1374
michaldybczak commented 7 years ago

If I understand it right, the idea is to make the global menu invisible till user hovers mouse over it? It would be then behaving exactly in the same way as in unity, where no global menu is shown till we hover mouse over it. It would be cool but is this widget capable of influencing other (global menu widget)?

amorozov commented 7 years ago

Yes, indeed, the intent is to repeat the behavior of Unity's global menu — it preserves space when a user doesn't need to see menu items and at the same time, menu items are pretty accessible when there's a demand.

The applet is already capable to demonstrate window's global menu, and, thus, completely replace the stock global menu applet. But, unfortunately, I didn't manage to make it demonstrate either menu or window title, not both at once.

michaldybczak commented 7 years ago

Well, it may take a while till we get there. There are more problems to be solved for really seamless application, like:

So basically, what I'm saying, it may be too soon to require such behaviour, but on other hand, I might be wrong. Anyway, this widget developer is overthrown with various requests and that's just a one person, not a team. He did already astonishing job on his own and I hope this widget becomes more popular and better in the future.

kupiqu commented 7 years ago

Well, if I uncheck 'Show next to icon and text' checkbox in the appmenu configuration tab, I get a plain mess :-) As of v1.7.0-4-g277bc31 menu items are drawn over the tilte, as in the screenshot

I think that's sort of intended (I was also confused at the beginning), try setting "icon and text opacity" to 0 in Application Menu subsection.

amorozov commented 7 years ago

Yeah, now it behaves almost as expected. Thank you for the advise!

(Almost, because opening a menu automatically moves focus there and thus hides buttons. I will try to workaround this in the code, but I'm a complete novice in the QML, and am not sure that I'm able to wrap the task up).

kotelnik commented 7 years ago

Sorry for my late responses. I've had little time lately. This particular issue with hidden buttons should be easy. Hopefully I'll fix that tonight. I've notice this too but I didn't think it was necessary to leave the buttons visible since you really need one click to close the popup menu and one to actually click the button. But I agree, it looks weird that the buttons are hiding...

kotelnik commented 7 years ago

I have committed the fix - is it working as expected?

amorozov commented 7 years ago

Wow, thank you!