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