Fix #30: add ToC to Markdown viewer

This commit is contained in:
Paddy Xu
2017-06-14 20:06:38 +03:00
parent c2ac272296
commit 3f82076c48
4 changed files with 121 additions and 11 deletions

View File

@@ -52,7 +52,7 @@ namespace QuickLook.Plugin.HtmlViewer
public void Prepare(string path, ContextObject context) public void Prepare(string path, ContextObject context)
{ {
context.PreferredSize = new Size(800, 800); context.PreferredSize = new Size(1000, 600);
context.CanFocus = true; context.CanFocus = true;
} }

View File

@@ -115,7 +115,9 @@ namespace QuickLook.Plugin.HtmlViewer
private void InnerBrowserNavigating(object sender, NavigatingCancelEventArgs e) private void InnerBrowserNavigating(object sender, NavigatingCancelEventArgs e)
{ {
if (_loaded) if (_loaded)
e.Cancel = true; if (_innerBrowser.Source.Scheme != e.Uri.Scheme ||
_innerBrowser.Source.AbsolutePath != e.Uri.AbsolutePath) // allow in-page navigation
e.Cancel = true;
_loaded = true; _loaded = true;
} }

View File

@@ -52,7 +52,7 @@ namespace QuickLook.Plugin.MarkdownViewer
public void Prepare(string path, ContextObject context) public void Prepare(string path, ContextObject context)
{ {
context.PreferredSize = new Size(800, 800); context.PreferredSize = new Size(1000, 600);
context.CanFocus = true; context.CanFocus = true;
} }

File diff suppressed because one or more lines are too long