Set menubar height to 0 in fullscreen (#924)
* Set menubar height to 0 in fullscreen * Avoid using hide() on the mainwindow's menubar as it breaks menubar actions. * Fixes save/load state shortcuts not working in fullscreen (#922) Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com> * Don't modify menubar width when exiting fullscreen * Fixes weird looking menubar on Windows Signed-off-by: Madhav Kanbur <abcdjdj@gmail.com>
This commit is contained in:
parent
6e3207f9dc
commit
25455cb7aa
|
@ -1991,12 +1991,13 @@ void MainWindow::onFullscreenToggled()
|
||||||
if (!mainWindow->isFullScreen())
|
if (!mainWindow->isFullScreen())
|
||||||
{
|
{
|
||||||
mainWindow->showFullScreen();
|
mainWindow->showFullScreen();
|
||||||
mainWindow->menuBar()->hide();
|
mainWindow->menuBar()->setFixedHeight(0); // Don't use hide() as menubar actions stop working
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mainWindow->showNormal();
|
mainWindow->showNormal();
|
||||||
mainWindow->menuBar()->show();
|
int menuBarHeight = mainWindow->menuBar()->sizeHint().height();
|
||||||
|
mainWindow->menuBar()->setFixedHeight(menuBarHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue