28 references to LinuxTrayIcon
Aspire.Tray.Tests (28)
LinuxTrayTests.cs (8)
472Assert.Equal(LinuxTrayIcon.Healthy, row.Icon); 473Assert.Equal(LinuxTrayIcon.Documentation, menu.Single(item => item.Action == LinuxTrayAction.Documentation).Icon); 474Assert.Equal(LinuxTrayIcon.Settings, menu.Single(item => item.Action == LinuxTrayAction.Settings).Icon); 587Assert.Equal(Enum.Parse<LinuxTrayIcon>(health), row.Icon); 598Assert.Equal(LinuxTrayIcon.Unknown, row.Icon); 621Assert.Equal(LinuxTrayIcon.Stopped, row.Icon); 627Assert.Equal(LinuxTrayIcon.Warning, row.Icon); 643Assert.Equal(Enum.Parse<LinuxTrayIcon>(expected), row.Icon);
src\Aspire.Tray\Linux\LinuxTrayApplication.cs (9)
378: item.Icon == LinuxTrayIcon.None ? Gtk.gtk_menu_item_new_with_label(item.Label) 380if (item.Icon != LinuxTrayIcon.None) 387LinuxTrayIcon.Documentation => Gtk.gtk_image_new_from_icon_name("help-browser", 1), 388LinuxTrayIcon.Settings => Gtk.gtk_image_new_from_icon_name("preferences-system", 1), 409private static nint CreateHealthImage(LinuxTrayIcon icon) 420LinuxTrayIcon.Healthy => 0x269653, 421LinuxTrayIcon.Warning => 0xE58A00, 422LinuxTrayIcon.Unhealthy => 0xD63E42, 454if (icon == LinuxTrayIcon.Stopped)
src\Aspire.Tray\Linux\LinuxTrayMenu.cs (11)
12internal LinuxTrayIcon Icon { get; init; } 49items.Add(new("Settings...", LinuxTrayAction.Settings) { Icon = LinuxTrayIcon.Settings }); 50items.Add(new("Documentation", LinuxTrayAction.Documentation) { Icon = LinuxTrayIcon.Documentation }); 104{ IsStarting: true } or { IsStopping: true } => LinuxTrayIcon.Warning, 105_ when state.Discovery != DiscoveryState.Live => LinuxTrayIcon.Warning, 106{ Error: not null } => LinuxTrayIcon.Unhealthy, 107{ IsRunning: false } => LinuxTrayIcon.Stopped, 110AppHostHealth.Healthy => LinuxTrayIcon.Healthy, 111AppHostHealth.Warning => LinuxTrayIcon.Warning, 112AppHostHealth.Unhealthy => LinuxTrayIcon.Unhealthy, 113_ => LinuxTrayIcon.Unknown