Fix #106: display thumbnails

This commit is contained in:
Paddy Xu
2017-11-05 02:15:00 +02:00
parent edc073a0ea
commit 24fafc5746
17 changed files with 304 additions and 68 deletions

View File

@@ -29,6 +29,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Threading;
using QuickLook.Annotations;
using QuickLook.Helpers;
using QuickLook.Plugin.ImageViewer.Exiv2;
namespace QuickLook.Plugin.ImageViewer
{
@@ -42,6 +43,7 @@ namespace QuickLook.Plugin.ImageViewer
private Uri _imageSource;
private DateTime _lastZoomTime = DateTime.MinValue;
private double _maxZoomFactor = 3d;
private Meta _meta;
private double _minZoomFactor = 0.1d;
private BitmapScalingMode _renderMode = BitmapScalingMode.HighQuality;
private BitmapSource _source;
@@ -70,6 +72,11 @@ namespace QuickLook.Plugin.ImageViewer
viewPanel.ManipulationDelta += ViewPanel_ManipulationDelta;
}
internal ImagePanel(Meta meta) : this()
{
Meta = meta;
}
public BitmapScalingMode RenderMode
{
get => _renderMode;
@@ -163,6 +170,17 @@ namespace QuickLook.Plugin.ImageViewer
}
}
public Meta Meta
{
get => _meta;
set
{
if (Equals(value, _meta)) return;
_meta = value;
OnPropertyChanged();
}
}
public void Dispose()
{
viewPanelImage?.Dispose();