1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

Fix losing menubar visibility settings after quit from fullscreen

BUG: 391415

Differential Revision: https://phabricator.kde.org/D11062
This commit is contained in:
Anmol Gautam 2018-03-09 22:28:52 +01:00 committed by David Rosca
parent 3c8fcd5f70
commit 5c97a3abb5
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -610,15 +610,17 @@ void BrowserWindow::loadSettings()
} }
settings.endGroup(); settings.endGroup();
m_statusBarVisible = showStatusBar;
statusBar()->setVisible(!isFullScreen() && showStatusBar); statusBar()->setVisible(!isFullScreen() && showStatusBar);
m_bookmarksToolbar->setVisible(showBookmarksToolbar); m_bookmarksToolbar->setVisible(showBookmarksToolbar);
m_navigationToolbar->setVisible(showNavigationToolbar); m_navigationToolbar->setVisible(showNavigationToolbar);
#ifndef Q_OS_MACOS #ifndef Q_OS_MACOS
m_menuBarVisible = showMenuBar;
menuBar()->setVisible(!isFullScreen() && showMenuBar); menuBar()->setVisible(!isFullScreen() && showMenuBar);
#endif #endif
m_navigationToolbar->setSuperMenuVisible(!showMenuBar); m_navigationToolbar->setSuperMenuVisible(isFullScreen() || !showMenuBar);
} }
void BrowserWindow::goForward() void BrowserWindow::goForward()
@ -1226,6 +1228,9 @@ bool BrowserWindow::event(QEvent *event)
m_navigationContainer->hide(); m_navigationContainer->hide();
m_navigationToolbar->enterFullScreen(); m_navigationToolbar->enterFullScreen();
// Show main menu button since menubar is hidden
m_navigationToolbar->setSuperMenuVisible(true);
} }
else if (e->oldState() & Qt::WindowFullScreen && !(windowState() & Qt::WindowFullScreen)) { else if (e->oldState() & Qt::WindowFullScreen && !(windowState() & Qt::WindowFullScreen)) {
// Leave fullscreen // Leave fullscreen