Bug 389118 - Global menu does not honor the setting for keyboard accelerators visibility
Summary: Global menu does not honor the setting for keyboard accelerators visibility
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Global Menu widget (other bugs)
Version First Reported In: 5.11.5
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-17 16:14 UTC by Tuomas Salokanto
Modified: 2018-01-17 17:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.13.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tuomas Salokanto 2018-01-17 16:14:49 UTC
Overview: 

    Global menu widget always shows keyboard accelerators (underscores) regardles of the selected setting in widget style configuration (always show, show when needed, never show).

Steps to Reproduce:

    1) Set menubar style to Application Menu Widget
    2) Set keyboard accelerator setting to never show or show when needed

Actual Results:

    Underscores are always shown regardless of the setting.

Expected Results:

    Underscores should be hidden when set to "never show" or only shown when modifier key is pressed in "show when needed" mode.
    This is the behaviour when menu is shown in application.

I'm not sure what part of the chain "forgets" the setting, is it the appmenu, the dbus interface, something in between, or just my fault.
Only way (hack) I found to disable them is by appending activeMenu.replace('&', '') to the appmenu's main.qml to remove the auto-injected ampersand from the menu items.

If this is indeed a bug, I am happy to help if somebody can show me to the right direction!
Comment 1 Kai Uwe Broulik 2018-01-17 16:37:46 UTC
Plasma style is independent of the widget style but I agree it would be nice to show them only as needed. However, I need to check whether I can detect Alt key being depressed without the window having focus. I probably cannot on Wayland.
Comment 2 Kai Uwe Broulik 2018-01-17 17:09:46 UTC
https://phabricator.kde.org/D9948
Comment 3 Kai Uwe Broulik 2018-01-17 17:13:52 UTC
Git commit aa2e5c5f68ca864734e6dc43d873d6dc1b8ba6a9 by Kai Uwe Broulik.
Committed on 17/01/2018 at 17:13.
Pushed by broulik into branch 'master'.

[AppMenu Applet] Underline mnemonics only while Alt is pressed

This makes for a less cluttered appearance and is what Breeze does by default.
FIXED-IN: 5.13.0

Differential Revision: https://phabricator.kde.org/D9948

M  +20   -1    applets/appmenu/package/contents/ui/main.qml

https://commits.kde.org/plasma-workspace/aa2e5c5f68ca864734e6dc43d873d6dc1b8ba6a9
Comment 4 Kai Uwe Broulik 2018-01-17 17:14:53 UTC
Note that my patch doesn't actually make it follow that setting. Breeze widget style has nothing to do with Plasma's appearance *but* my patch makes the default setting behave the same and makes for a tidier appearance.
Comment 5 Tuomas Salokanto 2018-01-17 17:23:44 UTC
(In reply to Kai Uwe Broulik from comment #4)
> Note that my patch doesn't actually make it follow that setting. Breeze
> widget style has nothing to do with Plasma's appearance *but* my patch makes
> the default setting behave the same and makes for a tidier appearance.

Thank you, at least I am happy with that :)