diff --git a/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs index 63587ef9..f97e0e85 100644 --- a/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/StatusBarView.axaml.cs @@ -1,4 +1,5 @@ using Avalonia; +using Avalonia.Controls; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.ReactiveUI; using Avalonia.Threading; @@ -77,6 +78,9 @@ namespace v2rayN.Desktop.Views if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { desktop.MainWindow.Icon = AvaUtils.GetAppIcon(_config.SystemProxyItem.SysProxyType); + var iconslist = TrayIcon.GetIcons(Application.Current); + iconslist[0].Icon = desktop.MainWindow.Icon; + TrayIcon.SetIcons(Application.Current, iconslist); } }