![]() Registered Member ![]()
|
Hi, here is a patch a add to every KDE apps the ability to show and hide menubar with the "Alt" key. It will not be added to KDE as is break some HIG rules.
This behavior can be foundin applications like Internet Explorer and Firefox (with hidemenu extension) and make sense because the menubar is useless 99.95% of time, you only need it when you want to use it. With menu: http://img29.imageshack.us/img29/1701/snapshot53.png Without: http://img265.imageshack.us/img265/9730/snapshot52.png Just add this code:
Under this bunch of line:
In kdelibs/kdeui/widgets/kmainwindow.cpp It will look like:
In KDE 4.4, it may differ a little in earlier versions (it is why I pasted the code and not a patch). It lack features such as always showing the menubar when alt is pressed and configuration, but it work fine for me. I hope at least one other member of the community will enjoy this patch.
Elv13, proud KDE user since KDE 2.2.
|
![]() Registered Member ![]()
|
There are already some wishes https://bugs.kde.org/show_bug.cgi?id=168070 and at least one brainstorm entry for this brainstorm.php#idea63895 , so you are not alone
![]() I think that a feature like this should be available systemwide, so please, comment your patch in the links i've given you. Anyway, why use Alt instead of the standard Ctrl+M? Maybe a good compromise between new users and experienced users would be adding this as an option in system settings, appareance, style, fine tunning: safer new users, happier old users ![]() |
![]() Registered Member ![]()
|
Simply because Alt is used by IE and one of my favorite Firefox extension and I like that. Alt is (in theory) used to work with menu anyway (alt+f = file and so on) so it make some sense after all.
Ctrl+m can't be used. Some apps, like kolourpaint, use it for something else. I just can't submit a patch that break so many apps, KDE4 is in API freeze after all. An application that work with 4.1 need to work with 4.4 with little or no modifications. Ctrl+Alt+M may be the best solution because it refer to global shortcut. I discussed about this patch a lot on IRC and this could be achieved using ctrl+alt+m. Even there, this patch can't be used. In intercept event a a really unusual way (because KDE does not support 1 key shortcut so I had to add the support for it). Of course, I can edit the patch to work with ctrl+alt+m, but this would be stupid, it is not the right way to setup shortcut, it was just the only one for "alt" alone. But the concept would work with all KDE applications with no problem, it is quite easy to hide the menu. About the menu entry to bring it back, you are wrong, even applications that does not support hiding menu will have the entry, it is already a global KDE function, however applications are not forced to use it. Take a look, Dolphin does not support hiding menu, but if I do, I see that: http://img41.imageshack.us/img41/8489/snapshot54.png As you can see, it does appear in the menu by itself, without any modification. The option would not belong in fine tuning, but global shortcut by the way, but as you, I also proposed to add it there too, but it was rejected.
Elv13, proud KDE user since KDE 2.2.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]