mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +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
|
||||
_window->windowHandle()->setScreen((QScreen*)target);
|
||||
_window->showFullScreen();
|
||||
|
||||
// also hide the QMainWindow's menuBar
|
||||
QMenuBar* menuBar = _window->menuBar();
|
||||
if (menuBar) {
|
||||
menuBar->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Application::unsetFullscreen(const QScreen* avoid) {
|
||||
|
@ -5015,6 +5021,12 @@ void Application::unsetFullscreen(const QScreen* avoid) {
|
|||
#else
|
||||
_window->setGeometry(targetGeometry);
|
||||
#endif
|
||||
|
||||
// also show the QMainWindow's menuBar
|
||||
QMenuBar* menuBar = _window->menuBar();
|
||||
if (menuBar) {
|
||||
menuBar->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue