From 42f8d4bbb5da67b412c35873b57c1ae06effd00e Mon Sep 17 00:00:00 2001 From: maxichrome Date: Wed, 11 May 2022 23:45:38 -0500 Subject: [PATCH] niceify some menu items --- apps/desktop/src-tauri/src/menu.rs | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/apps/desktop/src-tauri/src/menu.rs b/apps/desktop/src-tauri/src/menu.rs index eb1c6ed9a..52db3400a 100644 --- a/apps/desktop/src-tauri/src/menu.rs +++ b/apps/desktop/src-tauri/src/menu.rs @@ -38,23 +38,29 @@ fn custom_menu_bar() -> Menu { let file = Submenu::new( "File", Menu::new() - .add_item(CustomMenuItem::new("quit".to_string(), "Quit")) - .add_item(CustomMenuItem::new("close".to_string(), "Close")), + .add_item( + CustomMenuItem::new("new_window".to_string(), "New Window") + .accelerator("CmdOrCtrl+N") + .disabled(), + ) + .add_item( + CustomMenuItem::new("close".to_string(), "Close Window").accelerator("CmdOrCtrl+W"), + ), ); let edit = Submenu::new( "Edit", Menu::new() - .add_item(CustomMenuItem::new("jeff".to_string(), "Copy")) - .add_item(CustomMenuItem::new("jeffd".to_string(), "Paste")), + .add_native_item(MenuItem::Copy) + .add_native_item(MenuItem::Paste), ); let view = Submenu::new( "View", Menu::new() - .add_item(CustomMenuItem::new( - "command_pallete".to_string(), - "Command Pallete", - )) - .add_item(CustomMenuItem::new("jeffd".to_string(), "Layout")), + .add_item( + CustomMenuItem::new("command_pallete".to_string(), "Command Pallete") + .accelerator("CmdOrCtrl+P"), + ) + .add_item(CustomMenuItem::new("layout".to_string(), "Layout").disabled()), ); let window = Submenu::new( "Window",