mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-23 06:56:33 +00:00
Fix macOS App shortcut (#18921)
- The App Shortcuts in macOS System Settings does not work for Zed since the menu items titles were not set. - Previously you could set a shortcut for `Zoom`. - This add support for `Window->Zoom` as well.
This commit is contained in:
parent
3c6989323f
commit
eea600ecc3
1 changed files with 3 additions and 1 deletions
|
@ -216,7 +216,8 @@ impl MacPlatform {
|
|||
|
||||
for menu_config in menus {
|
||||
let menu = NSMenu::new(nil).autorelease();
|
||||
menu.setTitle_(ns_string(&menu_config.name));
|
||||
let menu_title = ns_string(&menu_config.name);
|
||||
menu.setTitle_(menu_title);
|
||||
menu.setDelegate_(delegate);
|
||||
|
||||
for item_config in menu_config.items {
|
||||
|
@ -229,6 +230,7 @@ impl MacPlatform {
|
|||
}
|
||||
|
||||
let menu_item = NSMenuItem::new(nil).autorelease();
|
||||
menu_item.setTitle_(menu_title);
|
||||
menu_item.setSubmenu_(menu);
|
||||
application_menu.addItem_(menu_item);
|
||||
|
||||
|
|
Loading…
Reference in a new issue