mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PTRun]Remove default images (app.dark.png fix) (#26843)
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Wox.Infrastructure.Image
|
||||
foreach (var key in _data.Keys)
|
||||
{
|
||||
// Using Ordinal since this is internal
|
||||
if (!Usage.TryGetValue(key, out _) && !(key.Equals(Constant.ErrorIcon, StringComparison.Ordinal) || key.Equals(Constant.DefaultIcon, StringComparison.Ordinal) || key.Equals(Constant.LightThemedErrorIcon, StringComparison.Ordinal) || key.Equals(Constant.LightThemedDefaultIcon, StringComparison.Ordinal)))
|
||||
if (!Usage.TryGetValue(key, out _) && !(key.Equals(Constant.ErrorIcon, StringComparison.Ordinal) || key.Equals(Constant.LightThemedErrorIcon, StringComparison.Ordinal)))
|
||||
{
|
||||
_data.TryRemove(key, out _);
|
||||
}
|
||||
|
||||
@@ -32,8 +32,6 @@ namespace Wox.Infrastructure.Image
|
||||
|
||||
public static string ErrorIconPath { get; set; }
|
||||
|
||||
public static string DefaultIconPath { get; set; }
|
||||
|
||||
private static readonly string[] ImageExtensions =
|
||||
{
|
||||
".png",
|
||||
@@ -49,7 +47,7 @@ namespace Wox.Infrastructure.Image
|
||||
{
|
||||
_hashGenerator = new ImageHashGenerator();
|
||||
|
||||
foreach (var icon in new[] { Constant.DefaultIcon, Constant.ErrorIcon, Constant.LightThemedDefaultIcon, Constant.LightThemedErrorIcon })
|
||||
foreach (var icon in new[] { Constant.ErrorIcon, Constant.LightThemedErrorIcon })
|
||||
{
|
||||
BitmapImage bmi = new BitmapImage();
|
||||
bmi.BeginInit();
|
||||
@@ -88,12 +86,10 @@ namespace Wox.Infrastructure.Image
|
||||
if (theme == Theme.Light || theme == Theme.HighContrastWhite)
|
||||
{
|
||||
ErrorIconPath = Constant.LightThemedErrorIcon;
|
||||
DefaultIconPath = Constant.LightThemedDefaultIcon;
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorIconPath = Constant.ErrorIcon;
|
||||
DefaultIconPath = Constant.DefaultIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user