mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 00:11:08 +08:00
fix: macOS tray icon color flickers during app launch
This commit is contained in:
parent
328803b894
commit
3c1bcd7d72
@ -486,6 +486,11 @@ impl Tray {
|
|||||||
|
|
||||||
#[cfg(not(target_os = "linux"))]
|
#[cfg(not(target_os = "linux"))]
|
||||||
let mut builder = TrayIconBuilder::with_id("main").icon(icon).icon_as_template(false);
|
let mut builder = TrayIconBuilder::with_id("main").icon(icon).icon_as_template(false);
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
{
|
||||||
|
let is_monochrome = verge.tray_icon.clone().is_none_or(|v| v == "monochrome");
|
||||||
|
builder = builder.icon_as_template(is_monochrome);
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user