fix: blurry tray icon in Windows

This commit is contained in:
GyDi 2023-07-23 13:25:54 +08:00
parent 31978d8de0
commit 5d5ab57469
No known key found for this signature in database
GPG Key ID: B28E790B95193457
4 changed files with 2 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -124,9 +124,9 @@ impl Tray {
#[cfg(target_os = "windows")] #[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/win-tray-icon-activated.png").to_vec()
} else { } else {
include_bytes!("../../icons/tray-icon.png").to_vec() include_bytes!("../../icons/win-tray-icon.png").to_vec()
}; };
let _ = tray.set_icon(tauri::Icon::Raw(indication_icon)); let _ = tray.set_icon(tauri::Icon::Raw(indication_icon));