mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
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:
@@ -34,17 +34,13 @@ internal sealed partial class WinGetExtensionPage : DynamicListPage, IDisposable
|
||||
|
||||
private IEnumerable<CatalogPackage>? _results;
|
||||
|
||||
public static IconInfo WinGetIcon { get; } = IconHelpers.FromRelativePath("Assets\\WinGet.svg");
|
||||
|
||||
public static IconInfo ExtensionsIcon { get; } = IconHelpers.FromRelativePath("Assets\\Extension.svg");
|
||||
|
||||
public static string ExtensionsTag => "windows-commandpalette-extension";
|
||||
|
||||
private readonly StatusMessage _errorMessage = new() { State = MessageState.Error };
|
||||
|
||||
public WinGetExtensionPage(string tag = "")
|
||||
{
|
||||
Icon = tag == ExtensionsTag ? ExtensionsIcon : WinGetIcon;
|
||||
Icon = tag == ExtensionsTag ? Icons.ExtensionsIcon : Icons.WinGetIcon;
|
||||
Name = Properties.Resources.winget_page_name;
|
||||
_tag = tag;
|
||||
ShowDetails = true;
|
||||
@@ -78,7 +74,7 @@ internal sealed partial class WinGetExtensionPage : DynamicListPage, IDisposable
|
||||
|
||||
EmptyContent = new CommandItem(new NoOpCommand())
|
||||
{
|
||||
Icon = WinGetIcon,
|
||||
Icon = Icons.WinGetIcon,
|
||||
Title = (string.IsNullOrEmpty(SearchText) && !HasTag) ?
|
||||
Properties.Resources.winget_placeholder_text :
|
||||
Properties.Resources.winget_no_packages_found,
|
||||
@@ -189,7 +185,7 @@ internal sealed partial class WinGetExtensionPage : DynamicListPage, IDisposable
|
||||
return [];
|
||||
}
|
||||
|
||||
string searchDebugText = $"{query}{(HasTag ? "+" : string.Empty)}{_tag}";
|
||||
var searchDebugText = $"{query}{(HasTag ? "+" : string.Empty)}{_tag}";
|
||||
Logger.LogDebug($"Starting search for '{searchDebugText}'");
|
||||
HashSet<CatalogPackage> results = new(new PackageIdCompare());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user