mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:36:57 +02:00
Hide menu bar when fullscreen in Rift VR display mode
This commit is contained in:
parent
929e463e40
commit
ff8ea46e26
1 changed files with 8 additions and 0 deletions
|
@ -1451,6 +1451,14 @@ void Application::checkBandwidthMeterClick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setFullscreen(bool fullscreen) {
|
void Application::setFullscreen(bool fullscreen) {
|
||||||
|
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableVRMode)) {
|
||||||
|
if (fullscreen) {
|
||||||
|
// Menu show() after hide() doesn't work with Rift VR display so set height instead.
|
||||||
|
_window->menuBar()->setMaximumHeight(0);
|
||||||
|
} else {
|
||||||
|
_window->menuBar()->setMaximumHeight(QWIDGETSIZE_MAX);
|
||||||
|
}
|
||||||
|
}
|
||||||
_window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
|
_window->setWindowState(fullscreen ? (_window->windowState() | Qt::WindowFullScreen) :
|
||||||
(_window->windowState() & ~Qt::WindowFullScreen));
|
(_window->windowState() & ~Qt::WindowFullScreen));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue