Add image for format not supported images

This commit is contained in:
Jack251970 2024-12-02 13:54:07 +08:00
parent c665482cb7
commit 4830988c55
3 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@ namespace Flow.Launcher.Infrastructure
public static readonly string ErrorIcon = Path.Combine(ImagesDirectory, "app_error.png");
public static readonly string MissingImgIcon = Path.Combine(ImagesDirectory, "app_missing_img.png");
public static readonly string LoadingImgIcon = Path.Combine(ImagesDirectory, "loading.png");
public static readonly string NoImageIcon = Path.Combine(ImagesDirectory, "no_image.png");
public static string PythonPath;
public static string NodePath;

View file

@ -22,6 +22,7 @@ namespace Flow.Launcher.Infrastructure.Image
private static readonly ConcurrentDictionary<string, string> GuidToKey = new();
private static IImageHashGenerator _hashGenerator;
private static readonly bool EnableImageHash = true;
public static ImageSource NoImage { get; } = new BitmapImage(new Uri(Constant.NoImageIcon));
public static ImageSource MissingImage { get; } = new BitmapImage(new Uri(Constant.MissingImgIcon));
public static ImageSource LoadingImage { get; } = new BitmapImage(new Uri(Constant.LoadingImgIcon));
public const int SmallIconSize = 64;
@ -222,7 +223,7 @@ namespace Flow.Launcher.Infrastructure.Image
}
catch (NotSupportedException)
{
image = null;
image = NoImage;
type = ImageType.Error;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB