Commit 60e76331 authored by Felix Ernst's avatar Felix Ernst Committed by Nate Graham
Browse files

Conserve sidebar visibility between browse and view mode

Before this commit, the visibility of the sidebar was separately
saved in browse mode and in view mode. This lead to the irritating
situation that the sidebar could somewhat unexpectedly show or hide
itself when switching between browse and view mode.

With this commit the sidebar will only be set visible when the user
explicitly showed it and the sidebar will only be set invisible
when the user explicitly hid it.

The fullscreen mode is exempt from this because having the sidebar
visible in fullscreen seems to go against why someone would trigger
the fullscreen mode in the first place.
parent 31bc51d9
......@@ -859,11 +859,11 @@ struct MainWindow::Private
GV_WARN_AND_RETURN_VALUE(false, "Sidebar not implemented on start page");
break;
case BrowseMainPageId:
return GwenviewConfig::sideBarVisibleBrowseMode();
return GwenviewConfig::sideBarVisible();
case ViewMainPageId:
return q->isFullScreen()
? GwenviewConfig::sideBarVisibleViewModeFullScreen()
: GwenviewConfig::sideBarVisibleViewMode();
: GwenviewConfig::sideBarVisible();
}
return false;
}
......@@ -875,12 +875,12 @@ struct MainWindow::Private
GV_WARN_AND_RETURN("Sidebar not implemented on start page");
break;
case BrowseMainPageId:
GwenviewConfig::setSideBarVisibleBrowseMode(visible);
GwenviewConfig::setSideBarVisible(visible);
break;
case ViewMainPageId:
q->isFullScreen()
? GwenviewConfig::setSideBarVisibleViewModeFullScreen(visible)
: GwenviewConfig::setSideBarVisibleViewMode(visible);
: GwenviewConfig::setSideBarVisible(visible);
break;
}
}
......
......@@ -20,10 +20,7 @@
<default>General.Name,General.ImageSize,Exif.Photo.ExposureTime,Exif.Photo.Flash</default>
</entry>
<entry name="SideBarVisibleBrowseMode" key="IsVisible BrowseMode" type="Bool">
<default>false</default>
</entry>
<entry name="SideBarVisibleViewMode" key="IsVisible ViewMode" type="Bool">
<entry name="SideBarVisible" key="IsVisible ViewMode" type="Bool">
<default>false</default>
</entry>
<entry name="SideBarVisibleViewModeFullScreen" key="IsVisible ViewMode FullScreen" type="Bool">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment