Fix #114: now the preview window should big enough

This commit is contained in:
Paddy Xu
2017-11-07 18:20:11 +02:00
parent e56c33cbd8
commit d6aa4d6959
3 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ namespace QuickLook.Plugin.PDFViewer
public partial class PdfViewerControl : UserControl, INotifyPropertyChanged, IDisposable public partial class PdfViewerControl : UserControl, INotifyPropertyChanged, IDisposable
{ {
private const double MinZoomFactor = 0.1d; private const double MinZoomFactor = 0.1d;
private const double MaxZoomFactor = 3d; private const double MaxZoomFactor = 5d;
private int _changePageDeltaSum; private int _changePageDeltaSum;
private bool _pdfLoaded; private bool _pdfLoaded;

View File

@@ -57,7 +57,7 @@ namespace QuickLook.Plugin.PDFViewer
var desiredSize = PdfViewerControl.GetDesiredControlSizeByFirstPage(path); var desiredSize = PdfViewerControl.GetDesiredControlSizeByFirstPage(path);
context.SetPreferredSizeFit(desiredSize, 0.6); context.SetPreferredSizeFit(desiredSize, 0.8);
} }
public void View(string path, ContextObject context) public void View(string path, ContextObject context)

View File

@@ -229,7 +229,7 @@ namespace QuickLook.Plugin
var heightRatio = max.Height * maxRatio / size.Height; var heightRatio = max.Height * maxRatio / size.Height;
var ratio = Math.Min(widthRatio, heightRatio); var ratio = Math.Min(widthRatio, heightRatio);
if (ratio > 1) ratio = 1; //if (ratio > 1) ratio = 1;
PreferredSize = new Size {Width = size.Width * ratio, Height = size.Height * ratio}; PreferredSize = new Size {Width = size.Width * ratio, Height = size.Height * ratio};