[Run] Switch to WPF UI theme manager (#30520)

* Switch to WPF UI theme manager

* fix

* add theme manager

* fix

* fix

* update error icon

* moved image initialization

* cleanup
This commit is contained in:
Davide Giacometti
2023-12-21 13:56:48 +01:00
committed by GitHub
parent e73e73fa6c
commit ae21b0dc09
12 changed files with 153 additions and 123 deletions

View File

@@ -31,7 +31,7 @@ namespace Wox.Infrastructure.Image
private static IImageHashGenerator _hashGenerator;
public static string ErrorIconPath { get; set; }
public static string ErrorIconPath { get; set; } = Constant.LightThemedErrorIcon;
private static readonly string[] ImageExtensions =
{
@@ -54,7 +54,7 @@ namespace Wox.Infrastructure.Image
return fs.Read(buffer, 0, buffer.Length) == buffer.Length && pngSignature.SequenceEqual(buffer);
}
public static void Initialize(Theme theme)
public static void Initialize()
{
_hashGenerator = new ImageHashGenerator();
@@ -86,7 +86,6 @@ namespace Wox.Infrastructure.Image
}
}
UpdateIconPath(theme);
Task.Run(() =>
{
Stopwatch.Normal("ImageLoader.Initialize - Preload images cost", async () =>