mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 07:55:34 +03:00
feat(core): add tauri::Builder::enable_macos_default_menu
(#5756)
This commit is contained in:
parent
0f26960891
commit
8866ecac3c
5
.changes/macos-disable-default-menu.md
Normal file
5
.changes/macos-disable-default-menu.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": "minor"
|
||||
---
|
||||
|
||||
Add `tauri::Builder::enable_macos_default_menu` to enable or disable the default menu creation on macOS.
|
@ -1310,6 +1310,21 @@ impl<R: Runtime> Builder<R> {
|
||||
self
|
||||
}
|
||||
|
||||
/// Enable or disable the default menu on macOS. Enabled by default.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use tauri::{MenuEntry, Submenu, MenuItem, Menu, CustomMenuItem};
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .enable_macos_default_menu(false);
|
||||
/// ```
|
||||
#[must_use]
|
||||
pub fn enable_macos_default_menu(mut self, enable: bool) -> Self {
|
||||
self.enable_macos_default_menu = enable;
|
||||
self
|
||||
}
|
||||
|
||||
/// Registers a menu event handler for all windows.
|
||||
///
|
||||
/// # Examples
|
||||
|
Loading…
Reference in New Issue
Block a user