64 references to PanelIcon
Aspire.Tray.Tests (64)
src\Aspire.Tray\Common\TrayPanel.cs (24)
951
TrayPanelGlyphs.AddIcon(commands,
PanelIcon
.Alert, new(banner.X + 10, banner.Y + 9, 16, 16), palette.BannerText);
973
TrayPanelGlyphs.AddIcon(commands,
PanelIcon
.Layers, art, palette.TextTertiary);
1007
TrayPanelGlyphs.AddIcon(commands, expanded ?
PanelIcon
.ChevronDown :
PanelIcon
.ChevronRight,
1057
PanelTargetKind.Dashboard => (
PanelIcon
.ExternalLink, $"Open dashboard for {host.DisplayName}", "Open dashboard", host.CanOpenDashboard),
1058
PanelTargetKind.Stop => (
PanelIcon
.Stop, $"Stop {host.DisplayName}", "Stop", host.CanStop),
1059
PanelTargetKind.Start => (
PanelIcon
.Play, $"Start {host.DisplayName}", "Start", host.CanStart),
1060
_ => (
PanelIcon
.More, expanded ? $"Hide actions for {host.DisplayName}" : $"More actions for {host.DisplayName}",
1109
private List<(PanelTargetKind Kind, int Item,
PanelIcon
Icon, string Label, string Name)> GetRowActions(AppHostMenuItem host, PanelSection section)
1112
var actions = new List<(PanelTargetKind, int,
PanelIcon
, string, string)>();
1115
actions.Add((PanelTargetKind.OpenInMenu, 0,
PanelIcon
.AppWindow, "Open in",
1120
actions.Add((PanelTargetKind.OpenIn, i,
PanelIcon
.AppWindow, application, $"Open {name} in {application}"));
1123
actions.Add((PanelTargetKind.ShowInFolder, 0,
PanelIcon
.Folder, $"Show in {_fileManagerName}", $"Show {name} in {_fileManagerName}"));
1124
actions.Add((PanelTargetKind.CopyPath, 0,
PanelIcon
.Copy, "Copy path", $"Copy the folder path of {name}"));
1126
? (PanelTargetKind.TogglePin, 0,
PanelIcon
.Unpin, "Unpin", $"Unpin {name}")
1127
: (PanelTargetKind.TogglePin, 0,
PanelIcon
.Pin, "Pin", $"Pin {name}"));
1130
actions.Add((PanelTargetKind.RemoveRecent, 0,
PanelIcon
.Remove, "Remove from recent", $"Remove {name} from recent AppHosts"));
1158
TrayPanelGlyphs.AddIcon(fallback,
PanelIcon
.AppWindow, new(TextLeft, item.Y + 7, 16, 16), iconColor);
1172
TrayPanelGlyphs.AddIcon(commands, _openInExpanded ?
PanelIcon
.ChevronDown :
PanelIcon
.ChevronRight,
1271
TrayPanelGlyphs.AddIcon(commands,
PanelIcon
.ChevronLeft, back.Inset(6, 6), _hover == backKey ? palette.TextPrimary : palette.TextSecondary);
1333
(PanelTargetKind.Settings,
PanelIcon
.Gear, _settings is null ? "Settings" : "Close settings",
1335
(PanelTargetKind.Documentation,
PanelIcon
.Globe, "Open Aspire documentation", "Documentation", null, right - 2 * ButtonSize - ButtonGap),
1336
(PanelTargetKind.Quit,
PanelIcon
.Power, _quitVerb, quitDescription, quitDescription, right - ButtonSize)
src\Aspire.Tray\Common\TrayPanelGlyphs.cs (21)
97
public static void AddIcon(List<PanelCommand> commands,
PanelIcon
icon, PanelRect bounds, PanelColor color)
99
var design = icon ==
PanelIcon
.Layers ? ArtDesignSize : IconDesignSize;
103
case
PanelIcon
.ExternalLink:
111
case
PanelIcon
.Stop:
114
case
PanelIcon
.Play:
120
case
PanelIcon
.More:
126
case
PanelIcon
.Gear:
130
case
PanelIcon
.Power:
135
case
PanelIcon
.ChevronDown:
138
case
PanelIcon
.ChevronRight:
141
case
PanelIcon
.ChevronLeft:
144
case
PanelIcon
.Alert:
149
case
PanelIcon
.Layers:
154
case
PanelIcon
.AppWindow:
159
case
PanelIcon
.Folder:
166
case
PanelIcon
.Copy:
171
case
PanelIcon
.Pin:
172
case
PanelIcon
.Unpin:
177
if (icon ==
PanelIcon
.Unpin)
182
case
PanelIcon
.Globe:
189
case
PanelIcon
.Remove:
TrayPanelTests.cs (19)
976
[InlineData((int)
PanelIcon
.ExternalLink)]
977
[InlineData((int)
PanelIcon
.Stop)]
978
[InlineData((int)
PanelIcon
.Play)]
979
[InlineData((int)
PanelIcon
.More)]
980
[InlineData((int)
PanelIcon
.Gear)]
981
[InlineData((int)
PanelIcon
.Power)]
982
[InlineData((int)
PanelIcon
.Globe)]
983
[InlineData((int)
PanelIcon
.ChevronDown)]
984
[InlineData((int)
PanelIcon
.ChevronRight)]
985
[InlineData((int)
PanelIcon
.Alert)]
986
[InlineData((int)
PanelIcon
.Layers)]
987
[InlineData((int)
PanelIcon
.AppWindow)]
988
[InlineData((int)
PanelIcon
.Folder)]
989
[InlineData((int)
PanelIcon
.Copy)]
990
[InlineData((int)
PanelIcon
.Pin)]
991
[InlineData((int)
PanelIcon
.Unpin)]
992
[InlineData((int)
PanelIcon
.Remove)]
995
var
icon = (
PanelIcon
)value;