preview size, continued

This commit is contained in:
Paddy Xu
2017-11-07 18:34:27 +02:00
parent d6aa4d6959
commit 6b2a481cf2
2 changed files with 5 additions and 2 deletions

View File

@@ -92,6 +92,9 @@ namespace QuickLook.Plugin.VideoViewer
windowSize.Width = Math.Max(def.Width, windowSize.Width);
windowSize.Height = Math.Max(def.Height, windowSize.Height);
if (!probe.HasVideo())
context.PreferredSize = def;
else
context.SetPreferredSizeFit(windowSize, 0.6);
context.TitlebarOverlap = true;
}

View File

@@ -213,7 +213,7 @@ namespace QuickLook.Plugin
}
/// <summary>
/// Set the size of viewer window and shrink to fit (to screen resolution).
/// Set the size of viewer window, scale or shrink to fit (to screen resolution).
/// The window can take maximum (maxRatio*resolution) space.
/// </summary>
/// <param name="size">The desired size.</param>