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 {
|
for menu_config in menus {
|
||||||
let menu = NSMenu::new(nil).autorelease();
|
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);
|
menu.setDelegate_(delegate);
|
||||||
|
|
||||||
for item_config in menu_config.items {
|
for item_config in menu_config.items {
|
||||||
|
@ -229,6 +230,7 @@ impl MacPlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
let menu_item = NSMenuItem::new(nil).autorelease();
|
let menu_item = NSMenuItem::new(nil).autorelease();
|
||||||
|
menu_item.setTitle_(menu_title);
|
||||||
menu_item.setSubmenu_(menu);
|
menu_item.setSubmenu_(menu);
|
||||||
application_menu.addItem_(menu_item);
|
application_menu.addItem_(menu_item);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue