mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 10:19:07 +00:00
Fix #114: now the preview window should big enough
This commit is contained in:
@@ -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;
|
||||||
|
@@ -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)
|
||||||
|
@@ -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};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user