diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.dark.png b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.dark.png
new file mode 100644
index 0000000000..ff56efcd57
Binary files /dev/null and b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.dark.png differ
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.dark.svg b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.dark.svg
new file mode 100644
index 0000000000..8253a598d5
--- /dev/null
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.dark.svg
@@ -0,0 +1,34 @@
+
+
+
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.light.png b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.light.png
new file mode 100644
index 0000000000..12d96a6d0e
Binary files /dev/null and b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.light.png differ
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.light.svg b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.light.svg
new file mode 100644
index 0000000000..311f98cdef
--- /dev/null
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.light.svg
@@ -0,0 +1,34 @@
+
+
+
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.png b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.png
deleted file mode 100644
index ce22b2dd9c..0000000000
Binary files a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.png and /dev/null differ
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.svg b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.svg
deleted file mode 100644
index 5028e6371f..0000000000
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Assets/WebSearch.svg
+++ /dev/null
@@ -1,46 +0,0 @@
-
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Icons.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Icons.cs
index 10f6fd32c1..856d7614a2 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Icons.cs
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Icons.cs
@@ -6,7 +6,11 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
namespace Microsoft.CmdPal.Ext.WebSearch;
-internal sealed class Icons
+internal static class Icons
{
- internal static IconInfo WebSearch { get; } = IconHelpers.FromRelativePath("Assets\\WebSearch.png");
+ internal static IconInfo WebSearch { get; } = IconHelpers.FromRelativePaths("Assets\\WebSearch.light.png", "Assets\\WebSearch.dark.png");
+
+ internal static IconInfo Search { get; } = new("\uE721");
+
+ internal static IconInfo History { get; } = new("\uE81C");
}
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj
index 6e0a94987b..2f6665d8d0 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Microsoft.CmdPal.Ext.WebSearch.csproj
@@ -31,13 +31,7 @@
-
-
-
-
- PreserveNewest
-
-
+
PreserveNewest
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Pages/WebSearchListPage.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Pages/WebSearchListPage.cs
index 6fe4ae5a7c..641d5f6135 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Pages/WebSearchListPage.cs
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WebSearch/Pages/WebSearchListPage.cs
@@ -18,7 +18,6 @@ namespace Microsoft.CmdPal.Ext.WebSearch.Pages;
internal sealed partial class WebSearchListPage : DynamicListPage, IDisposable
{
- private readonly IconInfo _newSearchIcon = new(string.Empty);
private readonly ISettingsInterface _settingsManager;
private readonly Lock _sync = new();
private static readonly CompositeFormat PluginInBrowserName = System.Text.CompositeFormat.Parse(Properties.Resources.plugin_in_browser_name);
@@ -32,7 +31,7 @@ internal sealed partial class WebSearchListPage : DynamicListPage, IDisposable
Name = Resources.command_item_title;
Title = Resources.command_item_title;
- Icon = IconHelpers.FromRelativePath("Assets\\WebSearch.png");
+ Icon = Icons.WebSearch;
Id = "com.microsoft.cmdpal.websearch";
_settingsManager = settingsManager;
@@ -70,6 +69,7 @@ internal sealed partial class WebSearchListPage : DynamicListPage, IDisposable
var historyItem = items[index];
history.Add(new ListItem(new SearchWebCommand(historyItem.SearchString, _settingsManager))
{
+ Icon = Icons.History,
Title = historyItem.SearchString,
Subtitle = historyItem.Timestamp.ToString("g", CultureInfo.InvariantCulture),
});
@@ -82,7 +82,7 @@ internal sealed partial class WebSearchListPage : DynamicListPage, IDisposable
}
}
- private static IListItem[] Query(string query, List historySnapshot, ISettingsInterface settingsManager, IconInfo newSearchIcon)
+ private static IListItem[] Query(string query, List historySnapshot, ISettingsInterface settingsManager)
{
ArgumentNullException.ThrowIfNull(query);
@@ -99,7 +99,7 @@ internal sealed partial class WebSearchListPage : DynamicListPage, IDisposable
{
Title = searchTerm,
Subtitle = string.Format(CultureInfo.CurrentCulture, PluginOpen, BrowserInfo.Name ?? BrowserInfo.MSEdgeName),
- Icon = newSearchIcon,
+ Icon = Icons.Search,
};
results.Add(result);
}
@@ -117,7 +117,7 @@ internal sealed partial class WebSearchListPage : DynamicListPage, IDisposable
historySnapshot = _historyItems;
}
- var items = Query(search ?? string.Empty, historySnapshot, _settingsManager, _newSearchIcon);
+ var items = Query(search ?? string.Empty, historySnapshot, _settingsManager);
lock (_sync)
{