Skip to content

Commit

Permalink
Enable rotation when viewing fullscreen gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Oct 30, 2021
1 parent e9e0e8f commit 288c02a
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions PicView/Shortcuts/MainKeyboardShortcuts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,24 +142,9 @@ internal static async Task MainWindow_KeysDownAsync(object sender, KeyEventArgs
{
GetMainWindow.Scroller.ScrollToVerticalOffset(GetMainWindow.Scroller.VerticalOffset - 30);
}
else if (GetPicGallery != null)
else if (GalleryFunctions.IsHorizontalOpen && GetPicGallery != null)
{
if (GalleryFunctions.IsHorizontalOpen)
{
GalleryNavigation.HorizontalNavigation(GalleryNavigation.Direction.Up);
}
else if (GalleryFunctions.IsVerticalFullscreenOpen)
{
await NavigateToPicAsync(false).ConfigureAwait(false);
}
else if (GalleryFunctions.IsHorizontalFullscreenOpen || GalleryFunctions.IsVerticalFullscreenOpen || GalleryFunctions.IsHorizontalOpen)
{
GalleryNavigation.ScrollTo(true, ctrlDown);
}
else
{
Rotate(true);
}
GalleryNavigation.HorizontalNavigation(GalleryNavigation.Direction.Up);
}
else
{
Expand All @@ -178,14 +163,6 @@ internal static async Task MainWindow_KeysDownAsync(object sender, KeyEventArgs
{
GalleryNavigation.HorizontalNavigation(GalleryNavigation.Direction.Down);
}
else if (GalleryFunctions.IsVerticalFullscreenOpen)
{
await NavigateToPicAsync().ConfigureAwait(false);
}
else if (GalleryFunctions.IsHorizontalFullscreenOpen || GalleryFunctions.IsHorizontalOpen)
{
GalleryNavigation.ScrollTo(false, ctrlDown);
}
else
{
Rotate(true);
Expand All @@ -212,21 +189,6 @@ internal static async Task MainWindow_KeysDownAsync(object sender, KeyEventArgs
{
GetMainWindow.Scroller.ScrollToVerticalOffset(GetMainWindow.Scroller.VerticalOffset + 30);
}
else if (GetPicGallery != null)
{
if (GalleryFunctions.IsHorizontalFullscreenOpen || GalleryFunctions.IsHorizontalOpen)
{
GalleryNavigation.ScrollTo(false, ctrlDown);
}
else if (GalleryFunctions.IsVerticalFullscreenOpen)
{
await NavigateToPicAsync().ConfigureAwait(false);
}
else
{
Rotate(false);
}
}
else
{
Rotate(false);
Expand Down

0 comments on commit 288c02a

Please sign in to comment.