Skip to content

Commit

Permalink
fixed: "Toolbar" and "Gallery Panel" re-enabled after quitting from f…
Browse files Browse the repository at this point in the history
…ull screen mode #1705
  • Loading branch information
d2phap committed Dec 12, 2023
1 parent 31a32f6 commit a2ef06f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/ImageGlass/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public partial class FrmMain : ThemedForm
private bool _isFramelessBeforeFullscreen;
private bool _isWindowFitBeforeFullscreen;
private bool _showToolbar = true;
private bool _showThumbnails = true;
private bool _showGallery = true;
private Rectangle _windowBound;
private FormWindowState _windowState = FormWindowState.Normal;

Expand Down
6 changes: 0 additions & 6 deletions Source/ImageGlass/FrmMain/FrmMain.Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,6 @@ public async Task SaveConfigsOnClosing()
WindowSettings.SetFrmMainPlacementConfig(wp);
}

// correct the settings when Full screen mode is enabled
if (Config.EnableFullScreen)
{
Config.ShowToolbar = _showToolbar;
Config.ShowGallery = _showThumbnails;
}

Config.LastSeenImagePath = Local.Images.GetFilePath(Local.CurrentIndex);
Config.ZoomLockValue = PicMain.ZoomFactor * 100f;
Expand Down
4 changes: 2 additions & 2 deletions Source/ImageGlass/FrmMain/FrmMain.IGMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2462,7 +2462,7 @@ public void SetFullScreenMode(bool enable = true,
_windowBound = Bounds;
_windowState = WindowState;
if (hideToolbar) _showToolbar = Config.ShowToolbar;
if (hideThumbnails) _showThumbnails = Config.ShowGallery;
if (hideThumbnails) _showGallery = Config.ShowGallery;

if (changeWindowState)
{
Expand Down Expand Up @@ -2496,7 +2496,7 @@ public void SetFullScreenMode(bool enable = true,

// restore last state of the window
if (hideToolbar) Config.ShowToolbar = _showToolbar;
if (hideThumbnails) Config.ShowGallery = _showThumbnails;
if (hideThumbnails) Config.ShowGallery = _showGallery;

if (hideToolbar && Config.ShowToolbar)
{
Expand Down

0 comments on commit a2ef06f

Please sign in to comment.