Commit 99601b3d authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Check menubar and statusbar visibilities before FullScreen mode and restore it after.

CCBUGS: 214107
CCBUGS: 220739
CCBUGS: 289262
CCBUGS: 236234
CCBUGS: 258180
CCBUGS: 293676
parent 903cf27c
......@@ -66,6 +66,8 @@ public:
fullScreenHideToolBar = false;
fullScreenHideThumbBar = true;
thumbbarVisibility = true;
menubarVisibility = true;
statusbarVisibility = true;
}
public:
......@@ -99,6 +101,14 @@ public:
/** Store previous visibility of thumbbar before ful-screen mode.
*/
bool thumbbarVisibility;
/** Store previous visibility of menubar before ful-screen mode.
*/
bool menubarVisibility;
/** Store previous visibility of statusbar before ful-screen mode.
*/
bool statusbarVisibility;
};
// --------------------------------------------------------------------------------------------------------
......@@ -160,12 +170,22 @@ void DXmlGuiWindow::slotToggleFullScreen(bool set)
{
kDebug() << "TURN OFF fullscreen";
// restore menubar, statusbar, sidebar, and thummbbar
// restore menubar
if (d->menubarVisibility)
menuBar()->show();
// restore statusbar
if (d->statusbarVisibility)
statusBar()->show();
// restore sidebars
menuBar()->show();
statusBar()->show();
showSideBar(true);
// restore thummbbar
if ((d->fsOptions & FS_THUMBBAR) && d->fullScreenHideThumbBar)
showThumbBar(d->thumbbarVisibility);
......@@ -188,12 +208,22 @@ void DXmlGuiWindow::slotToggleFullScreen(bool set)
{
kDebug() << "TURN ON fullscreen";
// hide menubar, statusbar, sidebar, and thummbbar
// hide menubar
d->menubarVisibility = menuBar()->isVisible();
menuBar()->hide();
// hide statusbar
d->statusbarVisibility = statusBar()->isVisible();
statusBar()->hide();
// hide sidebars
showSideBar(false);
// hide thummbbar
d->thumbbarVisibility = thumbbarVisibility();
if ((d->fsOptions & FS_THUMBBAR) && d->fullScreenHideThumbBar)
......
Supports Markdown
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