mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-13 11:09:06 +00:00
Use app fallback logo
This commit is contained in:
@@ -24,7 +24,10 @@
|
||||
Margin="8"
|
||||
VerticalAlignment="Top"
|
||||
Opacity="0"
|
||||
Stretch="Fill">
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
SnapsToDevicePixels="True"
|
||||
Stretch="Fill"
|
||||
UseLayoutRounding="True">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
|
@@ -19,6 +19,7 @@ using QuickLook.Common.ExtensionMethods;
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin;
|
||||
using QuickLook.Plugin.AppViewer.ApkPackageParser;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
@@ -76,6 +77,8 @@ public partial class ApkInfoPanel : UserControl, IAppInfoPanel
|
||||
modDate.Text = last.ToString(CultureInfo.CurrentCulture);
|
||||
permissions.ItemsSource = apkInfo.Permissions;
|
||||
|
||||
if (!apkInfo.HasIcon)
|
||||
{
|
||||
using var stream = new MemoryStream(apkInfo.Logo);
|
||||
var icon = new BitmapImage();
|
||||
icon.BeginInit();
|
||||
@@ -84,6 +87,11 @@ public partial class ApkInfoPanel : UserControl, IAppInfoPanel
|
||||
icon.EndInit();
|
||||
icon.Freeze();
|
||||
image.Source = icon;
|
||||
}
|
||||
else
|
||||
{
|
||||
image.Source = new BitmapImage(new Uri("pack://application:,,,/QuickLook.Plugin.AppViewer;component/Resources/android.png"));
|
||||
}
|
||||
|
||||
_context.IsBusy = false;
|
||||
});
|
||||
|
@@ -19,9 +19,6 @@ using System.Collections.Generic;
|
||||
|
||||
namespace QuickLook.Plugin.AppViewer.ApkPackageParser;
|
||||
|
||||
/// <summary>
|
||||
/// https://github.com/hylander0/Iteedee.ApkReader
|
||||
/// </summary>
|
||||
public class ApkInfo
|
||||
{
|
||||
public string Label { get; set; }
|
||||
|
@@ -23,7 +23,10 @@
|
||||
Height="128"
|
||||
VerticalAlignment="Top"
|
||||
Opacity="0"
|
||||
Stretch="Fill">
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
SnapsToDevicePixels="True"
|
||||
Stretch="Fill"
|
||||
UseLayoutRounding="True">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
|
@@ -24,7 +24,10 @@
|
||||
Margin="8"
|
||||
VerticalAlignment="Top"
|
||||
Opacity="0"
|
||||
Stretch="Fill">
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
SnapsToDevicePixels="True"
|
||||
Stretch="Fill"
|
||||
UseLayoutRounding="True">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
|
@@ -20,6 +20,7 @@ using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin;
|
||||
using QuickLook.Plugin.AppViewer.ApkPackageParser;
|
||||
using QuickLook.Plugin.AppViewer.IpaPackageParser;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
@@ -78,7 +79,7 @@ public partial class IpaInfoPanel : UserControl, IAppInfoPanel
|
||||
modDate.Text = last.ToString(CultureInfo.CurrentCulture);
|
||||
permissions.ItemsSource = ipaInfo.Permissions;
|
||||
|
||||
if (ipaInfo.Logo != null)
|
||||
if (!ipaInfo.HasIcon)
|
||||
{
|
||||
using var stream = new MemoryStream(ipaInfo.Logo);
|
||||
var icon = new BitmapImage();
|
||||
@@ -89,6 +90,10 @@ public partial class IpaInfoPanel : UserControl, IAppInfoPanel
|
||||
icon.Freeze();
|
||||
image.Source = icon;
|
||||
}
|
||||
else
|
||||
{
|
||||
image.Source = new BitmapImage(new Uri("pack://application:,,,/QuickLook.Plugin.AppViewer;component/Resources/ios.png"));
|
||||
}
|
||||
|
||||
_context.IsBusy = false;
|
||||
});
|
||||
|
@@ -24,7 +24,10 @@
|
||||
Height="128"
|
||||
Margin="0,-20,0,0"
|
||||
Opacity="0"
|
||||
Stretch="Fill">
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
SnapsToDevicePixels="True"
|
||||
Stretch="Fill"
|
||||
UseLayoutRounding="True">
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
QuickLook.Plugin/QuickLook.Plugin.AppViewer/Resources/ios.png
Normal file
BIN
QuickLook.Plugin/QuickLook.Plugin.AppViewer/Resources/ios.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
Reference in New Issue
Block a user