{
+ let path = if parent.is_empty() {
+ menu.name.to_string()
+ } else {
+ format!("{parent} › {}", menu.name)
+ };
+ panel = panel.child(menu_header(theme, path.clone()));
+ for (index, item) in menu.items.into_iter().enumerate() {
+ match item {
+ OwnedMenuItem::Action { name, action, .. } => {
+ panel = panel.child(menu_row(
+ cx,
+ theme,
+ format!("app-menu-{path}-{index}"),
+ name,
+ false,
+ move |this, _, window, cx| {
+ this.app_menu_position = None;
+ cx.notify();
+ window.dispatch_action(action.boxed_clone(), cx);
+ cx.stop_propagation();
+ },
+ ));
+ }
+ OwnedMenuItem::Submenu(submenu) => {
+ panel = append_app_menu(cx, theme, panel, submenu, path.clone());
+ }
+ OwnedMenuItem::Separator => {
+ panel = panel.child(
+ div()
+ .flex_shrink_0()
+ .my_1()
+ .h(px(1.))
+ .bg(rgb(theme.separator)),
+ );
+ }
+ OwnedMenuItem::SystemMenu(_) => {}
+ }
+ }
+ panel
+}
+
fn toolbar(
cx: &mut Context
,
theme: &Theme,
@@ -2758,6 +2907,9 @@ fn toolbar(
.border_b_1()
.border_color(rgb(theme.separator))
.bg(rgb(theme.panel));
+ if cfg!(any(target_os = "windows", target_os = "linux")) {
+ bar = bar.child(app_menu_button(cx, theme, active));
+ }
bar = bar.child(icon_button(
cx,
theme,
@@ -3014,11 +3166,24 @@ fn drop_zone(
.bg(rgba((accent << 8) | 0x14))
});
div()
+ .relative()
.flex_1()
.flex()
.items_center()
.justify_center()
.p_8()
+ .when(
+ cfg!(any(target_os = "windows", target_os = "linux")),
+ |zone| {
+ zone.child(
+ div()
+ .absolute()
+ .top(px(9.))
+ .left(px(12.))
+ .child(app_menu_button(cx, theme, active)),
+ )
+ },
+ )
.child(
panel
.child(
@@ -7245,7 +7410,7 @@ fn update_action_label(update: &updater::Update) -> String {
}
/// Floating card announcing a new release, with the next step inline. It
-/// works on every platform (the About panel is in the macOS menu only).
+/// works on every platform, alongside the About panel's update controls.
fn update_notice(
cx: &mut Context,
theme: &Theme,
diff --git a/docs/usage.md b/docs/usage.md
index cb93203..abe688d 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -40,6 +40,11 @@ other tracks align to them. See [format limits](formats.md) for unsupported edit
| Full screen | Ctrl+Cmd+F | F11 |
| Quit | Cmd+Q | Ctrl+Q |
+On Windows and Linux, the **Menu** button is available in the top toolbar and
+on the empty start screen. It provides About, Check for Updates, Use with AI
+Agents, Path Fixer, analysis-cache settings, and appearance selection. On macOS,
+these commands are available in the native menu bar.
+
Escape closes the open menu, panel, or dialog.
## CLI basics