feat: support monochrome tray icon

This commit is contained in:
MystiPanda
2024-05-15 12:00:38 +08:00
parent 72edd2e15d
commit ecb2fbf900
13 changed files with 71 additions and 7 deletions

View File

@@ -180,6 +180,8 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
let proxy_bypass = patch.system_proxy_bypass;
let language = patch.language;
let port = patch.verge_mixed_port;
#[cfg(target_os = "macos")]
let tray_icon = patch.tray_icon;
let common_tray_icon = patch.common_tray_icon;
let sysproxy_tray_icon = patch.sysproxy_tray_icon;
let tun_tray_icon = patch.tun_tray_icon;
@@ -240,6 +242,10 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
{
handle::Handle::update_systray_part()?;
}
#[cfg(target_os = "macos")]
if tray_icon.is_some() {
handle::Handle::update_systray_part()?;
}
<Result<()>>::Ok(())
} {