finish first version of TextViewer plug-in

This commit is contained in:
Paddy Xu
2017-04-25 00:54:09 +03:00
parent 5e70b0052f
commit c38c640af5
13 changed files with 264 additions and 27 deletions

View File

@@ -6,7 +6,7 @@ namespace QuickLook.Plugin.PDFViewer
public class Plugin : IViewer
{
private PdfViewerControl _pdfControl;
public int Priority => 9999;
public int Priority => int.MaxValue;
public bool CanHandle(string path)
{
@@ -22,7 +22,7 @@ namespace QuickLook.Plugin.PDFViewer
}
}
public void View(string path, ViewContentContainer container)
public void BoundSize(string path, ViewContentContainer container)
{
_pdfControl = new PdfViewerControl();
@@ -31,7 +31,10 @@ namespace QuickLook.Plugin.PDFViewer
desiredSize.Width += 150; // add thumbnails column
container.SetPreferedSizeFit(desiredSize, 0.7);
}
public void View(string path, ViewContentContainer container)
{
container.SetContent(_pdfControl);
_pdfControl.Loaded += (sender, e) =>