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
+1
View File
@@ -19,5 +19,6 @@
- 隐藏日志中的订阅信息
- 优化部分界面文案文本
- 优化切换节点时的延迟
- 优化托盘退出快捷键显示
</details>
+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)?;