-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[macOS]: display keyboard accelerators in the macOS menu #18067
Conversation
- The keyboard accelerators are displayed in the application menu - Register shortcut CMD+, to open the preferences
According to the Apple Human Interface Guidelines, menu items need to use title-style-capitalization.
2b3d8a7
to
9a8531c
Compare
I can't test since I don't have access to the platform, but I assume that adding the accel group to the main window overrides dt's shortcut system for those keys (disabling the ability to reassign or overload, with double click etc). Instead, you could just show the (default) assigned keys, using
but have dt handle the actual shortcuts. (Of course this should be updated if the user deletes/reassigns the shortcuts, but that's too much of a hassle for this one case...) To define a darktable shortcut for preferences, extend the setup for the button in
(the second line conditional on
instead of |
@dterrahe: I tried that but without an accel group I cannot get the accelerators to show. According to the documentation for AccelLabel:
and the AccelFlags are set by |
But also
On linux, it is sufficient to do just that, as long as you don't also do
But then clearing the accel widget should work, so I've done that in the POC implementation in a5a4965, which adds a menu to a linux window just for demonstration purposes. The "meta" is just added to show how you would deal with the "preferences" shortcut here (on top of the |
Just spent again some effort and tried all your suggestions, unfortunately without success. Since this blocks the possibility of reassigning I think it is best to give up on showing the accelerators and better keep the functionality. So I close this PR and open a new one just to register Thanks for all your hints @dterrahe |
fixes #14484
fixes #18051
CMD+,
to open the preferencesThis is only for macOS, wrapped in
#ifdef MAC_INTEGRATION
, so no effects on other OS.