Update App Menus to add ...
for some modal action menu, and group menu items by type. (#8951)
Release Notes: - Improved App Menu, add `...` for modal action menu, and group menu items by type. In macOS and Windows, the `...` suffix of menu item, is means that will open a dialog.
This commit is contained in:
parent
4a60326c1c
commit
2f15676b7c
2 changed files with 16 additions and 11 deletions
|
@ -698,9 +698,9 @@ impl CollabTitlebarItem {
|
||||||
ContextMenu::build(cx, |menu, _| {
|
ContextMenu::build(cx, |menu, _| {
|
||||||
menu.action("Settings", zed_actions::OpenSettings.boxed_clone())
|
menu.action("Settings", zed_actions::OpenSettings.boxed_clone())
|
||||||
.action("Extensions", extensions_ui::Extensions.boxed_clone())
|
.action("Extensions", extensions_ui::Extensions.boxed_clone())
|
||||||
.action("Theme", theme_selector::Toggle.boxed_clone())
|
.action("Theme...", theme_selector::Toggle.boxed_clone())
|
||||||
.separator()
|
.separator()
|
||||||
.action("Share Feedback", feedback::GiveFeedback.boxed_clone())
|
.action("Share Feedback...", feedback::GiveFeedback.boxed_clone())
|
||||||
.action("Sign Out", client::SignOut.boxed_clone())
|
.action("Sign Out", client::SignOut.boxed_clone())
|
||||||
})
|
})
|
||||||
.into()
|
.into()
|
||||||
|
@ -722,10 +722,10 @@ impl CollabTitlebarItem {
|
||||||
.menu(|cx| {
|
.menu(|cx| {
|
||||||
ContextMenu::build(cx, |menu, _| {
|
ContextMenu::build(cx, |menu, _| {
|
||||||
menu.action("Settings", zed_actions::OpenSettings.boxed_clone())
|
menu.action("Settings", zed_actions::OpenSettings.boxed_clone())
|
||||||
.action("Theme", theme_selector::Toggle.boxed_clone())
|
.action("Theme...", theme_selector::Toggle.boxed_clone())
|
||||||
.action("Extensions", extensions_ui::Extensions.boxed_clone())
|
.action("Extensions", extensions_ui::Extensions.boxed_clone())
|
||||||
.separator()
|
.separator()
|
||||||
.action("Share Feedback", feedback::GiveFeedback.boxed_clone())
|
.action("Share Feedback...", feedback::GiveFeedback.boxed_clone())
|
||||||
})
|
})
|
||||||
.into()
|
.into()
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
use collab_ui::collab_panel;
|
||||||
use gpui::{Menu, MenuItem, OsAction};
|
use gpui::{Menu, MenuItem, OsAction};
|
||||||
|
use terminal_view::terminal_panel;
|
||||||
|
|
||||||
pub fn app_menus() -> Vec<Menu<'static>> {
|
pub fn app_menus() -> Vec<Menu<'static>> {
|
||||||
use zed_actions::Quit;
|
use zed_actions::Quit;
|
||||||
|
@ -18,7 +20,7 @@ pub fn app_menus() -> Vec<Menu<'static>> {
|
||||||
MenuItem::action("Open Default Settings", super::OpenDefaultSettings),
|
MenuItem::action("Open Default Settings", super::OpenDefaultSettings),
|
||||||
MenuItem::action("Open Default Key Bindings", super::OpenDefaultKeymap),
|
MenuItem::action("Open Default Key Bindings", super::OpenDefaultKeymap),
|
||||||
MenuItem::action("Open Local Settings", super::OpenLocalSettings),
|
MenuItem::action("Open Local Settings", super::OpenLocalSettings),
|
||||||
MenuItem::action("Select Theme", theme_selector::Toggle),
|
MenuItem::action("Select Theme...", theme_selector::Toggle),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
MenuItem::action("Extensions", extensions_ui::Extensions),
|
MenuItem::action("Extensions", extensions_ui::Extensions),
|
||||||
|
@ -122,7 +124,9 @@ pub fn app_menus() -> Vec<Menu<'static>> {
|
||||||
}),
|
}),
|
||||||
MenuItem::separator(),
|
MenuItem::separator(),
|
||||||
MenuItem::action("Project Panel", project_panel::ToggleFocus),
|
MenuItem::action("Project Panel", project_panel::ToggleFocus),
|
||||||
MenuItem::action("Command Palette", command_palette::Toggle),
|
MenuItem::action("Collab Panel", collab_panel::ToggleFocus),
|
||||||
|
MenuItem::action("Terminal Panel", terminal_panel::ToggleFocus),
|
||||||
|
MenuItem::separator(),
|
||||||
MenuItem::action("Diagnostics", diagnostics::Deploy),
|
MenuItem::action("Diagnostics", diagnostics::Deploy),
|
||||||
MenuItem::separator(),
|
MenuItem::separator(),
|
||||||
],
|
],
|
||||||
|
@ -133,13 +137,16 @@ pub fn app_menus() -> Vec<Menu<'static>> {
|
||||||
MenuItem::action("Back", workspace::GoBack),
|
MenuItem::action("Back", workspace::GoBack),
|
||||||
MenuItem::action("Forward", workspace::GoForward),
|
MenuItem::action("Forward", workspace::GoForward),
|
||||||
MenuItem::separator(),
|
MenuItem::separator(),
|
||||||
MenuItem::action("Go to File", file_finder::Toggle),
|
MenuItem::action("Command Palette...", command_palette::Toggle),
|
||||||
|
MenuItem::separator(),
|
||||||
|
MenuItem::action("Go to File...", file_finder::Toggle),
|
||||||
// MenuItem::action("Go to Symbol in Project", project_symbols::Toggle),
|
// MenuItem::action("Go to Symbol in Project", project_symbols::Toggle),
|
||||||
MenuItem::action("Go to Symbol in Editor", outline::Toggle),
|
MenuItem::action("Go to Symbol in Editor...", outline::Toggle),
|
||||||
|
MenuItem::action("Go to Line/Column...", go_to_line::Toggle),
|
||||||
|
MenuItem::separator(),
|
||||||
MenuItem::action("Go to Definition", editor::actions::GoToDefinition),
|
MenuItem::action("Go to Definition", editor::actions::GoToDefinition),
|
||||||
MenuItem::action("Go to Type Definition", editor::actions::GoToTypeDefinition),
|
MenuItem::action("Go to Type Definition", editor::actions::GoToTypeDefinition),
|
||||||
MenuItem::action("Find All References", editor::actions::FindAllReferences),
|
MenuItem::action("Find All References", editor::actions::FindAllReferences),
|
||||||
MenuItem::action("Go to Line/Column", go_to_line::Toggle),
|
|
||||||
MenuItem::separator(),
|
MenuItem::separator(),
|
||||||
MenuItem::action("Next Problem", editor::actions::GoToDiagnostic),
|
MenuItem::action("Next Problem", editor::actions::GoToDiagnostic),
|
||||||
MenuItem::action("Previous Problem", editor::actions::GoToPrevDiagnostic),
|
MenuItem::action("Previous Problem", editor::actions::GoToPrevDiagnostic),
|
||||||
|
@ -156,8 +163,6 @@ pub fn app_menus() -> Vec<Menu<'static>> {
|
||||||
Menu {
|
Menu {
|
||||||
name: "Help",
|
name: "Help",
|
||||||
items: vec![
|
items: vec![
|
||||||
MenuItem::action("Command Palette", command_palette::Toggle),
|
|
||||||
MenuItem::separator(),
|
|
||||||
MenuItem::action("View Telemetry", crate::OpenTelemetryLog),
|
MenuItem::action("View Telemetry", crate::OpenTelemetryLog),
|
||||||
MenuItem::action("View Dependency Licenses", crate::OpenLicenses),
|
MenuItem::action("View Dependency Licenses", crate::OpenLicenses),
|
||||||
MenuItem::action("Show Welcome", workspace::Welcome),
|
MenuItem::action("Show Welcome", workspace::Welcome),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue