From c598d93ad3662975d5e729fcfebe197f6cbe975a Mon Sep 17 00:00:00 2001 From: Jaime Bernardo Date: Mon, 19 Jun 2023 20:15:12 +0100 Subject: [PATCH] [PTRun]Remove default images (app.dark.png fix) (#26843) --- .../launcher/PowerLauncher/Images/app.dark.png | Bin 166 -> 0 bytes .../launcher/PowerLauncher/Images/app.light.png | Bin 154 -> 0 bytes .../launcher/PowerLauncher/MainWindow.xaml | 1 - .../launcher/PowerLauncher/PowerLauncher.csproj | 9 --------- .../Wox.Infrastructure/Image/ImageCache.cs | 2 +- .../Wox.Infrastructure/Image/ImageLoader.cs | 6 +----- src/modules/launcher/Wox.Plugin/Constant.cs | 2 -- src/runner/main.cpp | 4 +--- 8 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 src/modules/launcher/PowerLauncher/Images/app.dark.png delete mode 100644 src/modules/launcher/PowerLauncher/Images/app.light.png diff --git a/src/modules/launcher/PowerLauncher/Images/app.dark.png b/src/modules/launcher/PowerLauncher/Images/app.dark.png deleted file mode 100644 index 49a0a39e6dd8e8908c00c092cd7163ddb7344685..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtTu&FrkP61PH#YJfRuExJob@I1 zhWh7AsZ4F2(-q%+7ufd2VBh3_jCP&ZFPu4ZW}D7Qb#B%(&zTzHcD&DY_!uk~ZnH4Z z^ucpphRp@_`3?;Xj7%&X0t!&ZhwP7W4dNHVBPW#`Z@z1^nc3&{dd{NxLK#4d89ZJ6 KT-G@yGywqgE;}6n diff --git a/src/modules/launcher/PowerLauncher/Images/app.light.png b/src/modules/launcher/PowerLauncher/Images/app.light.png deleted file mode 100644 index ccf947383126208cca15455f16b5b15d9b30ee59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA1|-9oezpUtL{AsTkP61PH#YJ%81T3rH2Gq3 zv%T`Np<~;^WX=x)6J-wBzT_`xm7X3tS> - - - @@ -65,12 +62,6 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - PreserveNewest diff --git a/src/modules/launcher/Wox.Infrastructure/Image/ImageCache.cs b/src/modules/launcher/Wox.Infrastructure/Image/ImageCache.cs index 4daf97959f..5cbae92a49 100644 --- a/src/modules/launcher/Wox.Infrastructure/Image/ImageCache.cs +++ b/src/modules/launcher/Wox.Infrastructure/Image/ImageCache.cs @@ -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 _); } diff --git a/src/modules/launcher/Wox.Infrastructure/Image/ImageLoader.cs b/src/modules/launcher/Wox.Infrastructure/Image/ImageLoader.cs index fab64e67f1..2a6e760336 100644 --- a/src/modules/launcher/Wox.Infrastructure/Image/ImageLoader.cs +++ b/src/modules/launcher/Wox.Infrastructure/Image/ImageLoader.cs @@ -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; } } diff --git a/src/modules/launcher/Wox.Plugin/Constant.cs b/src/modules/launcher/Wox.Plugin/Constant.cs index f66d9b36ad..8f37b72fc7 100644 --- a/src/modules/launcher/Wox.Plugin/Constant.cs +++ b/src/modules/launcher/Wox.Plugin/Constant.cs @@ -63,9 +63,7 @@ namespace Wox.Plugin public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion; public static readonly int ThumbnailSize = 64; - public static readonly string DefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.dark.png"); public static readonly string ErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.dark.png"); - public static readonly string LightThemedDefaultIcon = Path.Combine(ProgramDirectory, "Images", "app.light.png"); public static readonly string LightThemedErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.light.png"); } } diff --git a/src/runner/main.cpp b/src/runner/main.cpp index d97dc7b4f4..5b8fa6d7b6 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -95,9 +95,7 @@ void debug_verify_launcher_assets() { namespace fs = std::filesystem; const fs::path powertoysRoot = get_module_folderpath(); - constexpr std::array assetsToCheck = { "modules\\launcher\\Images\\app.dark.png", - "modules\\launcher\\Images\\app.light.png", - "modules\\launcher\\Images\\app_error.dark.png", + constexpr std::array assetsToCheck = { "modules\\launcher\\Images\\app_error.dark.png", "modules\\launcher\\Images\\app_error.light.png" }; for (const auto asset : assetsToCheck) {