Просмотр исходного кода

Fix incorrect resizing when having window resizeable and image is not from file

Ruben 4 лет назад
Родитель
Сommit
2ba78b1387
1 измененных файлов с 3 добавлено и 6 удалено
  1. 3 6
      PicView/SystemIntegration/NativeMethods.cs

+ 3 - 6
PicView/SystemIntegration/NativeMethods.cs

@@ -157,14 +157,11 @@ namespace PicView.SystemIntegration
                 var w = UILogic.ConfigureWindows.GetMainWindow;
                 if (w == null) { return IntPtr.Zero; }
 
-                if (ChangeImage.Navigation.FreshStartup)
+                if (w.MainImage.Source == null)
                 {
-                    if (w.MainImage.Source == null)
+                    if (UC.GetStartUpUC is not null)
                     {
-                        if (UC.GetStartUpUC is not null)
-                        {
-                            UC.GetStartUpUC.ResponsiveSize(w.Width);
-                        }
+                        UC.GetStartUpUC.ResponsiveSize(w.Width);
                     }
                 }
                 else