fix: linux not change icon

This commit is contained in:
GyDi 2023-05-28 18:14:11 +08:00
parent f5edca94d3
commit 6e391df5ee
No known key found for this signature in database
GPG Key ID: 9C3AD40F1F99880A
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ windows-sys = { version = "0.48", features = ["Win32_System_LibraryLoader", "Win
features = ["global-shortcut-all", "icon-png", "process-all", "shell-all", "system-tray", "updater", "window-all"] features = ["global-shortcut-all", "icon-png", "process-all", "shell-all", "system-tray", "updater", "window-all"]
[target.'cfg(linux)'.dependencies.tauri] [target.'cfg(linux)'.dependencies.tauri]
features = ["global-shortcut-all", "icon-png", "process-all", "shell-all", "system-tray", "updater", "window-all", "native-tls-vendored", "reqwest-native-tls-vendored"] features = ["global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all", "native-tls-vendored", "reqwest-native-tls-vendored"]
[features] [features]

View File

@ -107,7 +107,7 @@ impl Tray {
let system_proxy = verge.enable_system_proxy.as_ref().unwrap_or(&false); let system_proxy = verge.enable_system_proxy.as_ref().unwrap_or(&false);
let tun_mode = verge.enable_tun_mode.as_ref().unwrap_or(&false); let tun_mode = verge.enable_tun_mode.as_ref().unwrap_or(&false);
#[cfg(not(target_os = "macos"))] #[cfg(target_os = "windows")]
{ {
let indication_icon = if *system_proxy { let indication_icon = if *system_proxy {
include_bytes!("../../icons/tray-icon-activated.png").to_vec() include_bytes!("../../icons/tray-icon-activated.png").to_vec()