-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feature: menu shortcuts #2715
Feature: menu shortcuts #2715
Conversation
This deprecates `desktop.Modifier` and uses a type alias to map to `fyne.KeyModifier`.
All keyboard shortcuts should implement these. It will be used for matching a keyboard action to built-in shortcuts and to display the keys when assigned to a menu.
This is either KeyModifierSuper (Darwin) or KeyModifierControl (other).
Thus, it can be used more flexible with the caller deciding upon the details.
main() is on top instead of in the middle.
This requires fontTools (https://github.com/fonttools/fonttools) to be installed. The source for the symbol font is Inter-Regular which is stripped to the few glyphs we need. The resulting font is about 8k bytes currently.
This allows to extract the menu entry expectation into a reusable function.
This does not test anything, yet.
This allows for additional test cases with different render outcome.
Separate text from check-icon refresh. The text refresh uses the helper method .refreshText() which was introduced with shortcut support.
This looks amazing thank you :).
|
Hm, I think this is a matter of personal taste, isn’t it? I can’t remember to ever have seen such an approach but I’m not against it. It’s probably worth to think over and create some mock-ups at least. Then we could decide if we want to do it. |
Strange, it must just be the GTK theme I have loaded :) thanks for opening a new ticket to discuss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, thanks!
Description:
This PR introduces basic shortcut support for menus.
The shortcuts still have to be registered explicitly.
Also, the shortcut is not deactivated if the menu item is deactivated.
Fixes #682
Checklist:
Where applicable: