mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
Autoshow and autohide menubar while in fullscreen mode.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24785 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3dc6a5f43c
commit
a72c205638
@ -641,12 +641,19 @@ bool GuiView::event(QEvent * e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case QEvent::ShortcutOverride: {
|
case QEvent::ShortcutOverride: {
|
||||||
|
QKeyEvent * ke = static_cast<QKeyEvent*>(e);
|
||||||
|
|
||||||
|
if (ke->modifiers() & Qt::AltModifier && isFullScreen()
|
||||||
|
&& menuBar()->isHidden()) {
|
||||||
|
menuBar()->show();
|
||||||
|
// Continue with even.
|
||||||
|
return QMainWindow::event(e);
|
||||||
|
}
|
||||||
|
|
||||||
if (d.current_work_area_)
|
if (d.current_work_area_)
|
||||||
// Nothing special to do.
|
// Nothing special to do.
|
||||||
return QMainWindow::event(e);
|
return QMainWindow::event(e);
|
||||||
|
|
||||||
QKeyEvent * ke = static_cast<QKeyEvent*>(e);
|
|
||||||
|
|
||||||
// Let Qt handle menu access and the Tab keys to navigate keys to navigate
|
// Let Qt handle menu access and the Tab keys to navigate keys to navigate
|
||||||
// between controls.
|
// between controls.
|
||||||
if (ke->modifiers() & Qt::AltModifier || ke->key() == Qt::Key_Tab
|
if (ke->modifiers() & Qt::AltModifier || ke->key() == Qt::Key_Tab
|
||||||
@ -1674,6 +1681,7 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
|||||||
// By default we won't need any update.
|
// By default we won't need any update.
|
||||||
if (bv)
|
if (bv)
|
||||||
bv->cursor().updateFlags(Update::None);
|
bv->cursor().updateFlags(Update::None);
|
||||||
|
bool dispatched = true;
|
||||||
|
|
||||||
switch(cmd.action) {
|
switch(cmd.action) {
|
||||||
case LFUN_BUFFER_IMPORT:
|
case LFUN_BUFFER_IMPORT:
|
||||||
@ -1903,10 +1911,18 @@ bool GuiView::dispatch(FuncRequest const & cmd)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
dispatched = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
if (isFullScreen()) {
|
||||||
|
if (menuBar()->isVisible())
|
||||||
|
menuBar()->hide();
|
||||||
|
if (statusBar()->isVisible())
|
||||||
|
statusBar()->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dispatched;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user