Skip to content
Snippets Groups Projects
Commit cafc2060 authored by GyDi's avatar GyDi
Browse files

fix: macos not change icon

parent b1f45752
No related branches found
No related tags found
No related merge requests found
......@@ -107,13 +107,16 @@ impl Tray {
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 indication_icon = if *system_proxy {
include_bytes!("../../icons/tray-icon-activated.png").to_vec()
} else {
include_bytes!("../../icons/tray-icon.png").to_vec()
};
#[cfg(not(target_os = "macos"))]
{
let indication_icon = if *system_proxy {
include_bytes!("../../icons/tray-icon-activated.png").to_vec()
} else {
include_bytes!("../../icons/tray-icon.png").to_vec()
};
tray.set_icon(tauri::Icon::Raw(indication_icon))?;
let _ = tray.set_icon(tauri::Icon::Raw(indication_icon));
}
let _ = tray.get_item("system_proxy").set_selected(*system_proxy);
let _ = tray.get_item("tun_mode").set_selected(*tun_mode);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment