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:
@@ -20,7 +20,7 @@ internal sealed partial class CloseWindowCommand : InvokableCommand
|
||||
|
||||
public CloseWindowCommand(Window window)
|
||||
{
|
||||
Icon = new IconInfo("\uE894");
|
||||
Icon = Icons.CloseWindow;
|
||||
Name = $"{Resources.windowwalker_Close}";
|
||||
_window = window;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ internal sealed partial class EndTaskCommand : InvokableCommand
|
||||
|
||||
public EndTaskCommand(Window window)
|
||||
{
|
||||
Icon = new IconInfo("\uF140");
|
||||
Icon = Icons.EndTask;
|
||||
Name = $"{Resources.windowwalker_Kill}";
|
||||
_window = window;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ internal static class ResultHelper
|
||||
return new WindowWalkerListItem(null)
|
||||
{
|
||||
Title = Resources.windowwalker_ExplorerInfoTitle,
|
||||
Icon = new IconInfo("\uE946"), // Info
|
||||
Icon = Icons.Info,
|
||||
Subtitle = Resources.windowwalker_ExplorerInfoSubTitle,
|
||||
Command = new ExplorerInfoResultCommand(),
|
||||
};
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||
|
||||
namespace Microsoft.CmdPal.Ext.WindowWalker;
|
||||
|
||||
internal sealed class Icons
|
||||
{
|
||||
internal static IconInfo WindowWalkerIcon { get; } = IconHelpers.FromRelativePath("Assets\\WindowWalker.svg");
|
||||
|
||||
internal static IconInfo EndTask { get; } = new IconInfo("\uF140"); // StatusCircleBlock
|
||||
|
||||
internal static IconInfo CloseWindow { get; } = new IconInfo("\uE894"); // Clear
|
||||
|
||||
internal static IconInfo Info { get; } = new IconInfo("\uE946"); // Info
|
||||
}
|
||||
@@ -19,7 +19,7 @@ internal sealed partial class WindowWalkerListPage : DynamicListPage, IDisposabl
|
||||
|
||||
public WindowWalkerListPage()
|
||||
{
|
||||
Icon = IconHelpers.FromRelativePath("Assets\\WindowWalker.svg");
|
||||
Icon = Icons.WindowWalkerIcon;
|
||||
Name = Resources.windowwalker_name;
|
||||
Id = "com.microsoft.cmdpal.windowwalker";
|
||||
PlaceholderText = Resources.windowwalker_PlaceholderText;
|
||||
|
||||
@@ -20,7 +20,7 @@ public partial class WindowWalkerCommandsProvider : CommandProvider
|
||||
{
|
||||
Id = "WindowWalker";
|
||||
DisplayName = Resources.windowwalker_name;
|
||||
Icon = IconHelpers.FromRelativePath("Assets\\WindowWalker.svg");
|
||||
Icon = Icons.WindowWalkerIcon;
|
||||
Settings = SettingsManager.Instance.Settings;
|
||||
|
||||
_windowWalkerPageItem = new CommandItem(new WindowWalkerListPage())
|
||||
|
||||
Reference in New Issue
Block a user