mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
Restoring autohiding and showing of menubar upon Pavel's request.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24788 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
40f50f2a94
commit
e5b6e5c58b
@ -663,9 +663,15 @@ bool GuiView::event(QEvent * e)
|
||||
if (!(ke->modifiers() & Qt::AltModifier)
|
||||
|| ke->key() == Qt::Key_Alt)
|
||||
return QMainWindow::event(e);
|
||||
static_cast<MenuBar *>(menuBar())->keyPressEvent(ke);
|
||||
MenuBar * menu_bar = static_cast<MenuBar *>(menuBar());
|
||||
menu_bar->keyPressEvent(ke);
|
||||
menu_bar->show();
|
||||
if (ke->isAccepted())
|
||||
return true;
|
||||
// Showing and hiding the menubar has the potential to create a bad
|
||||
// flickering due to the window resizing. On Windows Vista, this flicker
|
||||
// is not visible at all.
|
||||
menu_bar->hide();
|
||||
// Otherwise continue with even.
|
||||
return QMainWindow::event(e);
|
||||
}
|
||||
@ -1937,6 +1943,13 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
if (isFullScreen()) {
|
||||
if (menuBar()->isVisible())
|
||||
menuBar()->hide();
|
||||
if (statusBar()->isVisible())
|
||||
statusBar()->hide();
|
||||
}
|
||||
|
||||
return dispatched;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user