chore: tray hotkey (#6373)

This commit is contained in:
AetherWing
2026-03-01 09:13:42 +00:00
committed by GitHub
parent 25a83388bb
commit 09ea979cf7
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -834,7 +834,12 @@ async fn create_tray_menu(
],
)?;
let quit = &MenuItem::with_id(app_handle, MenuIds::EXIT, &texts.exit, true, Some("CmdOrControl+Q"))?;
let quit_accelerator = hotkeys.get("quit").map(|s| s.as_str());
#[cfg(target_os = "macos")]
let quit_accelerator = quit_accelerator.or(Some("Cmd+Q"));
let quit = &MenuItem::with_id(app_handle, MenuIds::EXIT, &texts.exit, true, quit_accelerator)?;
let separator = &PredefinedMenuItem::separator(app_handle)?;