public void TrayIconChanging(AddonTrayIconEventArgs e) { if (SystemParameters.HighContrast) { e.Icon = IconUtils.ColorIcon(e.Icon, e.Kind, SystemColors.WindowTextColor); } }
public static Icon CreateAndResolveThroughBuiltInAddons(IconKind kind) { var args = new AddonTrayIconEventArgs { Kind = kind, Icon = Create(kind) }; foreach (var addon in BuiltInItems.OrderBy(b => b.Priority)) { addon.TrayIconChanging(args); } return(args.Icon); }
public void TrayIconChanging(AddonTrayIconEventArgs e) { if (!SystemParameters.HighContrast) { if (SystemSettings.IsSystemLightTheme) { e.Icon = IconUtils.ColorIcon(e.Icon, e.Kind, Colors.Black); } else { // It's the default so don't bother doing anything. } } }
public void TrayIconChanging(AddonTrayIconEventArgs e) { if (SettingsService.UseLegacyIcon) { if (SystemSettings.IsSystemLightTheme) { e.Icon = new Icon(Application.GetResourceStream(new Uri("pack://application:,,,/EarTrumpet;component/Assets/Application.ico")).Stream); } else { e.Icon = TrayIconFactory.Create(IconKind.OriginalIcon); } } }
public static Icon CreateAndResolveAll(IconKind kind) { var items = BuiltInItems.ToList(); if (AddonItems != null) { items.AddRange(AddonItems); } items = items.OrderBy(b => b.Priority).ToList(); var args = new AddonTrayIconEventArgs { Kind = kind, Icon = Create(kind) }; foreach (var addon in items) { addon.TrayIconChanging(args); } return(args.Icon); }