Skip to content

Commit

Permalink
fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Aug 8, 2023
1 parent d8f08fa commit 743e0b6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion core/tauri/src/menu/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ impl<R: Runtime> Menu<R> {
#[cfg(target_os = "macos")]
&PredefinedMenuItem::separator(app_handle),
&PredefinedMenuItem::close_window(app_handle, None),
],
)?;

let help_menu = Submenu::with_items(
app_handle,
"Help",
true,
&[
#[cfg(not(target_os = "macos"))]
&PredefinedMenuItem::about(app_handle, None, Some(about_metadata)),
],
)?;
Expand Down Expand Up @@ -215,11 +224,15 @@ impl<R: Runtime> Menu<R> {
&[&PredefinedMenuItem::fullscreen(app_handle, None)],
)?,
&window_menu,
&help_menu,
],
)?;

#[cfg(target_os = "macos")]
window_menu.set_as_windows_menu_for_nsapp()?;
{
window_menu.set_as_windows_menu_for_nsapp()?;
help_menu.set_as_help_menu_for_nsapp()?;
}

Ok(menu)
}
Expand Down

0 comments on commit 743e0b6

Please sign in to comment.