mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-24 02:00:55 +08:00
Fix #50: window moved unexpectedly when new size is smaller than min size
This commit is contained in:
@@ -160,6 +160,10 @@ namespace QuickLook
|
||||
|
||||
private void ResizeAndCenter(Size size)
|
||||
{
|
||||
// resize to MinSize first
|
||||
size.Width = Math.Max(size.Width, MinWidth);
|
||||
size.Height = Math.Max(size.Height, MinHeight);
|
||||
|
||||
if (!IsLoaded)
|
||||
{
|
||||
// if the window is not loaded yet, just leave the problem to WPF
|
||||
|
||||
Reference in New Issue
Block a user