mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[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 commitf492c4efdb. * Revert "Added theme awereness based on somil55s PR" This reverts commit8edd3226be. * 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:
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -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()
|
||||
|
||||
@@ -48,12 +48,6 @@
|
||||
<ProjectReference Include="..\..\Wox.Plugin\Wox.Plugin.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Images\windowwalker.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Languages\en.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -67,5 +61,14 @@
|
||||
<PackageReference Include="Mages" Version="1.6.0" />
|
||||
<PackageReference Include="System.Runtime" Version="4.3.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Images\windowwalker.dark.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Images\windowwalker.light.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -8,5 +8,5 @@
|
||||
"Language":"csharp",
|
||||
"Website":"http://www.windowwalker.com/",
|
||||
"ExecuteFileName":"Microsoft.Plugin.WindowWalker.dll",
|
||||
"IcoPath":"Images\\windowwalker.png"
|
||||
"IcoPath":"Images\\windowwalker.dark.png"
|
||||
}
|
||||
Reference in New Issue
Block a user