mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
fix(src-tauri/src/app/menu.rs): warning on linux
add `#[cfg(target_os = "macos")]` when declare titlebar and titlebar_menu
This commit is contained in:
@@ -29,6 +29,7 @@ pub fn init() -> Menu {
|
|||||||
|
|
||||||
let stay_on_top =
|
let stay_on_top =
|
||||||
CustomMenuItem::new("stay_on_top".to_string(), "Stay On Top").accelerator("CmdOrCtrl+T");
|
CustomMenuItem::new("stay_on_top".to_string(), "Stay On Top").accelerator("CmdOrCtrl+T");
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
let titlebar =
|
let titlebar =
|
||||||
CustomMenuItem::new("titlebar".to_string(), "Titlebar").accelerator("CmdOrCtrl+B");
|
CustomMenuItem::new("titlebar".to_string(), "Titlebar").accelerator("CmdOrCtrl+B");
|
||||||
let theme_light = CustomMenuItem::new("theme_light".to_string(), "Light");
|
let theme_light = CustomMenuItem::new("theme_light".to_string(), "Light");
|
||||||
@@ -40,6 +41,7 @@ pub fn init() -> Menu {
|
|||||||
} else {
|
} else {
|
||||||
stay_on_top
|
stay_on_top
|
||||||
};
|
};
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
let titlebar_menu = if chat_conf.titlebar {
|
let titlebar_menu = if chat_conf.titlebar {
|
||||||
titlebar.selected()
|
titlebar.selected()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user