Standardizing built-in extension icon handling (#40606)

Just standardizing built-in extensions to use a `internal sealed class
Icons` for all their non-dynamic icons.

Looks like a LOT of changes, but it's icons all the way down.
This commit is contained in:
Michael Jolley
2025-07-15 14:33:25 -05:00
committed by GitHub
parent cc16b61eb7
commit b552f2ac1e
93 changed files with 371 additions and 245 deletions

View File

@@ -18,11 +18,11 @@ public partial class ClipboardHistoryCommandsProvider : CommandProvider
{
Title = Properties.Resources.list_item_title,
Subtitle = Properties.Resources.list_item_subtitle,
Icon = Icons.ClipboardList,
Icon = Icons.ClipboardListIcon,
};
DisplayName = Properties.Resources.provider_display_name;
Icon = Icons.ClipboardList;
Icon = Icons.ClipboardListIcon;
Id = "Windows.ClipboardHistory";
}

View File

@@ -19,11 +19,11 @@ internal sealed partial class CopyCommand : InvokableCommand
Name = Properties.Resources.copy_command_name;
if (clipboardFormat == ClipboardFormat.Text)
{
Icon = Icons.Copy;
Icon = Icons.CopyIcon;
}
else
{
Icon = Icons.Picture;
Icon = Icons.PictureIcon;
}
}

View File

@@ -20,7 +20,7 @@ internal sealed partial class PasteCommand : InvokableCommand
_clipboardItem = clipboardItem;
_clipboardFormat = clipboardFormat;
Name = Properties.Resources.paste_command_name;
Icon = Icons.Paste;
Icon = Icons.PasteIcon;
}
private void HideWindow()

View File

@@ -8,11 +8,11 @@ namespace Microsoft.CmdPal.Ext.ClipboardHistory;
internal sealed class Icons
{
internal static IconInfo Copy { get; } = new("\xE8C8");
internal static IconInfo CopyIcon { get; } = new("\xE8C8");
internal static IconInfo Picture { get; } = new("\xE8B9");
internal static IconInfo PictureIcon { get; } = new("\xE8B9");
internal static IconInfo Paste { get; } = new("\uE77F");
internal static IconInfo PasteIcon { get; } = new("\uE77F");
internal static IconInfo ClipboardList { get; } = new("\uF0E3");
internal static IconInfo ClipboardListIcon { get; } = new("\uF0E3");
}

View File

@@ -24,7 +24,7 @@ internal sealed partial class ClipboardHistoryListPage : ListPage
{
clipboardHistory = [];
_defaultIconPath = string.Empty;
Icon = Icons.ClipboardList;
Icon = Icons.ClipboardListIcon;
Name = Properties.Resources.clipboard_history_page_name;
Id = "com.microsoft.cmdpal.clipboardHistory";
ShowDetails = true;