|
@@ -177,10 +177,9 @@ impl Tray {
|
|
|
let tun_tray_icon = verge.tun_tray_icon.as_ref().unwrap_or(&false);
|
|
|
|
|
|
let mut indication_icon = if *system_proxy {
|
|
|
- #[cfg(not(target_os = "macos"))]
|
|
|
- let mut icon = include_bytes!("../../icons/tray-icon-sys.png").to_vec();
|
|
|
#[cfg(target_os = "macos")]
|
|
|
- let mut icon = include_bytes!("../../icons/mac-tray-icon-sys.png").to_vec();
|
|
|
+ let _ = tray.set_icon_as_template(false);
|
|
|
+ let mut icon = include_bytes!("../../icons/tray-icon-sys.ico").to_vec();
|
|
|
if *sysproxy_tray_icon {
|
|
|
let icon_dir_path = dirs::app_home_dir()?.join("icons");
|
|
|
let png_path = icon_dir_path.join("sysproxy.png");
|
|
@@ -193,10 +192,12 @@ impl Tray {
|
|
|
}
|
|
|
icon
|
|
|
} else {
|
|
|
- #[cfg(not(target_os = "macos"))]
|
|
|
- let mut icon = include_bytes!("../../icons/tray-icon.png").to_vec();
|
|
|
+ #[cfg(target_os = "macos")]
|
|
|
+ let _ = tray.set_icon_as_template(true);
|
|
|
#[cfg(target_os = "macos")]
|
|
|
let mut icon = include_bytes!("../../icons/mac-tray-icon.png").to_vec();
|
|
|
+ #[cfg(not(target_os = "macos"))]
|
|
|
+ let mut icon = include_bytes!("../../icons/tray-icon.ico").to_vec();
|
|
|
if *common_tray_icon {
|
|
|
let icon_dir_path = dirs::app_home_dir()?.join("icons");
|
|
|
let png_path = icon_dir_path.join("common.png");
|
|
@@ -211,10 +212,9 @@ impl Tray {
|
|
|
};
|
|
|
|
|
|
if *tun_mode {
|
|
|
- #[cfg(not(target_os = "macos"))]
|
|
|
- let mut icon = include_bytes!("../../icons/tray-icon-tun.png").to_vec();
|
|
|
#[cfg(target_os = "macos")]
|
|
|
- let mut icon = include_bytes!("../../icons/mac-tray-icon-tun.png").to_vec();
|
|
|
+ let _ = tray.set_icon_as_template(false);
|
|
|
+ let mut icon = include_bytes!("../../icons/tray-icon-tun.ico").to_vec();
|
|
|
if *tun_tray_icon {
|
|
|
let icon_dir_path = dirs::app_home_dir()?.join("icons");
|
|
|
let png_path = icon_dir_path.join("tun.png");
|