[PowerToys Run] Updated (plugin) icons with MDL2 (#4149)

* Updated (plugin) icons with MDL2

* Image wasn't updating

* Based on feedback, updated app icon and windowwalker icon

* Updated app icon

* Updated Window Walker icon

* Change build action / Copy to output directory to None and Do Not Copy - like it was originally

* Fix

* Fix

* Resized images

* Added theme awereness based on somil55s PR

* Added theming to Shell and WindowWalker

* Revert "Added theming to Shell and WindowWalker"

This reverts commit f492c4efdb.

* Revert "Added theme awereness based on somil55s PR"

This reverts commit 8edd3226be.

* Typo fix

* Added new theming support for the new Calculator, Shell and WindowWalker icons

* Added Unit test reference back in
This commit is contained in:
Niels Laute
2020-07-14 07:59:19 +02:00
committed by GitHub
parent 01ca13cccb
commit 5f0e8d3d8e
72 changed files with 185 additions and 97 deletions

View File

@@ -8,7 +8,7 @@ namespace Microsoft.Plugin.WindowWalker
public class Main : IPlugin, IPluginI18n
{
private static List<SearchResult> _results = new List<SearchResult>();
private static string IcoPath = "Images/windowwalker.png";
private string IconPath { get; set; }
private PluginInitContext Context { get; set; }
static Main()
@@ -24,7 +24,7 @@ namespace Microsoft.Plugin.WindowWalker
return _results.Select(x => new Result()
{
Title = x.Result.Title,
IcoPath = IcoPath,
IcoPath = IconPath,
SubTitle = "Running: " + x.Result.ProcessName,
Action = c =>
{
@@ -37,7 +37,27 @@ namespace Microsoft.Plugin.WindowWalker
public void Init(PluginInitContext context)
{
Context = context;
Context = context;
Context.API.ThemeChanged += OnThemeChanged;
UpdateIconPath(Context.API.GetCurrentTheme());
}
// Todo : Update with theme based IconPath
private void UpdateIconPath(Theme theme)
{
if (theme == Theme.Light || theme == Theme.HighContrastWhite)
{
IconPath = "Images/windowwalker.light.png";
}
else
{
IconPath = "Images/windowwalker.dark.png";
}
}
private void OnThemeChanged(Theme _, Theme newTheme)
{
UpdateIconPath(newTheme);
}
public string GetTranslatedPluginTitle()