mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
[PTRun]Remove default images (app.dark.png fix) (#26843)
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 166 B |
Binary file not shown.
|
Before Width: | Height: | Size: 154 B |
@@ -14,7 +14,6 @@
|
|||||||
WindowStartupLocation="Manual"
|
WindowStartupLocation="Manual"
|
||||||
AllowDrop="True"
|
AllowDrop="True"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
Icon="Images/app.dark.png"
|
|
||||||
AllowsTransparency="True"
|
AllowsTransparency="True"
|
||||||
SourceInitialized="OnSourceInitialized"
|
SourceInitialized="OnSourceInitialized"
|
||||||
Loaded="OnLoaded"
|
Loaded="OnLoaded"
|
||||||
|
|||||||
@@ -53,9 +53,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="app.png" />
|
<None Remove="app.png" />
|
||||||
<None Remove="Images\app.dark.png" />
|
|
||||||
<None Remove="Images\app.light.png" />
|
|
||||||
<None Remove="Images\app.light1.png" />
|
|
||||||
<None Remove="Images\app_error.dark.png" />
|
<None Remove="Images\app_error.dark.png" />
|
||||||
<None Remove="Images\app_error.light.png" />
|
<None Remove="Images\app_error.light.png" />
|
||||||
<None Remove="Images\RunResource.ico" />
|
<None Remove="Images\RunResource.ico" />
|
||||||
@@ -65,12 +62,6 @@
|
|||||||
<Content Include="app.png">
|
<Content Include="app.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Images\app.dark.png">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Images\app.light.png">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Images\app_error.dark.png">
|
<Content Include="Images\app_error.dark.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace Wox.Infrastructure.Image
|
|||||||
foreach (var key in _data.Keys)
|
foreach (var key in _data.Keys)
|
||||||
{
|
{
|
||||||
// Using Ordinal since this is internal
|
// 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 _);
|
_data.TryRemove(key, out _);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ namespace Wox.Infrastructure.Image
|
|||||||
|
|
||||||
public static string ErrorIconPath { get; set; }
|
public static string ErrorIconPath { get; set; }
|
||||||
|
|
||||||
public static string DefaultIconPath { get; set; }
|
|
||||||
|
|
||||||
private static readonly string[] ImageExtensions =
|
private static readonly string[] ImageExtensions =
|
||||||
{
|
{
|
||||||
".png",
|
".png",
|
||||||
@@ -49,7 +47,7 @@ namespace Wox.Infrastructure.Image
|
|||||||
{
|
{
|
||||||
_hashGenerator = new ImageHashGenerator();
|
_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();
|
BitmapImage bmi = new BitmapImage();
|
||||||
bmi.BeginInit();
|
bmi.BeginInit();
|
||||||
@@ -88,12 +86,10 @@ namespace Wox.Infrastructure.Image
|
|||||||
if (theme == Theme.Light || theme == Theme.HighContrastWhite)
|
if (theme == Theme.Light || theme == Theme.HighContrastWhite)
|
||||||
{
|
{
|
||||||
ErrorIconPath = Constant.LightThemedErrorIcon;
|
ErrorIconPath = Constant.LightThemedErrorIcon;
|
||||||
DefaultIconPath = Constant.LightThemedDefaultIcon;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ErrorIconPath = Constant.ErrorIcon;
|
ErrorIconPath = Constant.ErrorIcon;
|
||||||
DefaultIconPath = Constant.DefaultIcon;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,7 @@ namespace Wox.Plugin
|
|||||||
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
|
public static readonly string Version = FileVersionInfo.GetVersionInfo(Assembly.Location.NonNull()).ProductVersion;
|
||||||
|
|
||||||
public static readonly int ThumbnailSize = 64;
|
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 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");
|
public static readonly string LightThemedErrorIcon = Path.Combine(ProgramDirectory, "Images", "app_error.light.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,9 +95,7 @@ void debug_verify_launcher_assets()
|
|||||||
{
|
{
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
const fs::path powertoysRoot = get_module_folderpath();
|
const fs::path powertoysRoot = get_module_folderpath();
|
||||||
constexpr std::array<std::string_view, 4> assetsToCheck = { "modules\\launcher\\Images\\app.dark.png",
|
constexpr std::array<std::string_view, 2> assetsToCheck = { "modules\\launcher\\Images\\app_error.dark.png",
|
||||||
"modules\\launcher\\Images\\app.light.png",
|
|
||||||
"modules\\launcher\\Images\\app_error.dark.png",
|
|
||||||
"modules\\launcher\\Images\\app_error.light.png" };
|
"modules\\launcher\\Images\\app_error.light.png" };
|
||||||
for (const auto asset : assetsToCheck)
|
for (const auto asset : assetsToCheck)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user