mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-02 12:00:01 -06:00
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:
@ -1991,12 +1991,13 @@ void MainWindow::onFullscreenToggled()
|
||||
if (!mainWindow->isFullScreen())
|
||||
{
|
||||
mainWindow->showFullScreen();
|
||||
mainWindow->menuBar()->hide();
|
||||
mainWindow->menuBar()->setFixedHeight(0); // Don't use hide() as menubar actions stop working
|
||||
}
|
||||
else
|
||||
{
|
||||
mainWindow->showNormal();
|
||||
mainWindow->menuBar()->show();
|
||||
int menuBarHeight = mainWindow->menuBar()->sizeHint().height();
|
||||
mainWindow->menuBar()->setFixedHeight(menuBarHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user