Skip to content

Commit 8cdb09d

Browse files
committed
feat(icons): add Logo and AddShortcut; replace direct asset calls
1 parent 05ea094 commit 8cdb09d

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

CmdPalWebSearchShortcut/WebSearchShortcut/Pages/AddShortcutPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public AddShortcutPage(WebSearchShortcutDataEntry? shortcut)
1515

1616
Title = isAdd ? Resources.AddShortcutPage_Title_Add : Resources.AddShortcutPage_Title_Edit;
1717
Name = $"[UNBOUND] {nameof(AddShortcutPage)}.{nameof(Name)} required - shortcut={(shortcut is null ? "null" : $"'{shortcut.Name}'")}";
18-
Icon = isAdd ? IconHelpers.FromRelativePath("Assets\\SearchAdd.png") : Icons.Edit;
18+
Icon = isAdd ? Icons.AddShortcut : Icons.EditShortcut;
1919

2020
_addShortcutForm = new AddShortcutForm(shortcut);
2121
}

CmdPalWebSearchShortcut/WebSearchShortcut/Properties/Icons.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ namespace WebSearchShortcut.Properties;
1111
/// </summary>
1212
internal static class Icons
1313
{
14+
/// <summary>
15+
/// Extension logo icon
16+
/// </summary>
17+
public static IconInfo Logo { get; } = IconHelpers.FromRelativePath("Assets\\Search.png");
18+
19+
/// <summary>
20+
/// "Add Shortcut" icon
21+
/// </summary>
22+
public static IconInfo AddShortcut { get; } = IconHelpers.FromRelativePath("Assets\\SearchAdd.png");
23+
24+
/// <summary>
25+
/// "Edit Shortcut" icon
26+
/// </summary>
27+
public static IconInfo EditShortcut { get; } = new("\uE70F");
28+
1429
/// <summary>
1530
/// Default fallback icon for links
1631
/// </summary>

CmdPalWebSearchShortcut/WebSearchShortcut/WebSearchShortcutCommandsProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public partial class WebSearchShortcutCommandsProvider : CommandProvider
2424
public WebSearchShortcutCommandsProvider()
2525
{
2626
DisplayName = Resources.WebSearchShortcut_DisplayName;
27-
Icon = IconHelpers.FromRelativePath("Assets\\Search.png");
27+
Icon = Icons.Logo;
2828

2929
var addShortcutPage = new AddShortcutPage(null)
3030
{
@@ -34,7 +34,7 @@ public WebSearchShortcutCommandsProvider()
3434
_addShortcutItem = new CommandItem(addShortcutPage)
3535
{
3636
Title = Resources.AddShortcutItem_Title,
37-
Icon = IconHelpers.FromRelativePath("Assets\\SearchAdd.png")
37+
Icon = Icons.AddShortcut
3838
};
3939
}
4040

0 commit comments

Comments
 (0)