mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
first cut at attempting to hide menu in full screen
This commit is contained in:
parent
8c7711168c
commit
9f501d4d72
1 changed files with 12 additions and 0 deletions
|
@ -4985,6 +4985,12 @@ void Application::setFullscreen(const QScreen* target) {
|
||||||
#endif
|
#endif
|
||||||
_window->windowHandle()->setScreen((QScreen*)target);
|
_window->windowHandle()->setScreen((QScreen*)target);
|
||||||
_window->showFullScreen();
|
_window->showFullScreen();
|
||||||
|
|
||||||
|
// also hide the QMainWindow's menuBar
|
||||||
|
QMenuBar* menuBar = _window->menuBar();
|
||||||
|
if (menuBar) {
|
||||||
|
menuBar->setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::unsetFullscreen(const QScreen* avoid) {
|
void Application::unsetFullscreen(const QScreen* avoid) {
|
||||||
|
@ -5015,6 +5021,12 @@ void Application::unsetFullscreen(const QScreen* avoid) {
|
||||||
#else
|
#else
|
||||||
_window->setGeometry(targetGeometry);
|
_window->setGeometry(targetGeometry);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// also show the QMainWindow's menuBar
|
||||||
|
QMenuBar* menuBar = _window->menuBar();
|
||||||
|
if (menuBar) {
|
||||||
|
menuBar->setVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue