first cut at attempting to hide menu in full screen

This commit is contained in:
ZappoMan 2015-08-20 16:55:19 -07:00
parent 8c7711168c
commit 9f501d4d72

View file

@ -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);
}
}