Przeglądaj źródła

Close fullscreen on `Esc`

Ruben 1 rok temu
rodzic
commit
9d8be0dd86
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      src/PicView.Avalonia/UI/FunctionsHelper.cs

+ 6 - 0
src/PicView.Avalonia/UI/FunctionsHelper.cs

@@ -409,6 +409,12 @@ public static class FunctionsHelper
             Navigation.Slideshow.StopSlideshow(Vm);
             return;
         }
+
+        if (SettingsHelper.Settings.WindowProperties.Fullscreen)
+        {
+            await WindowHelper.MaximizeRestore();
+            return;
+        }
         if (Application.Current?.ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
         {
             return;