mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Menubar autohiding: add some more comments and hide it a bit earlier.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24797 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
513c880f8d
commit
fc22b68e37
@ -645,7 +645,9 @@ bool GuiView::event(QEvent * e)
|
|||||||
if (isFullScreen() && menuBar()->isHidden()) {
|
if (isFullScreen() && menuBar()->isHidden()) {
|
||||||
QKeyEvent * ke = static_cast<QKeyEvent*>(e);
|
QKeyEvent * ke = static_cast<QKeyEvent*>(e);
|
||||||
// FIXME: we should also try to detect special LyX shortcut such as
|
// FIXME: we should also try to detect special LyX shortcut such as
|
||||||
// Alt-P and Alt-M
|
// Alt-P and Alt-M. Right now there is a hack in
|
||||||
|
// GuiWorkArea::processKeySym() that hides again the menubar for
|
||||||
|
// those cases.
|
||||||
if (ke->modifiers() & Qt::AltModifier && ke->key() != Qt::Key_Alt)
|
if (ke->modifiers() & Qt::AltModifier && ke->key() != Qt::Key_Alt)
|
||||||
menuBar()->show();
|
menuBar()->show();
|
||||||
return QMainWindow::event(e);
|
return QMainWindow::event(e);
|
||||||
|
@ -407,17 +407,17 @@ void GuiWorkArea::redraw()
|
|||||||
|
|
||||||
void GuiWorkArea::processKeySym(KeySymbol const & key, KeyModifier mod)
|
void GuiWorkArea::processKeySym(KeySymbol const & key, KeyModifier mod)
|
||||||
{
|
{
|
||||||
|
if (lyx_view_->isFullScreen() && lyx_view_->menuBar()->isVisible()) {
|
||||||
|
// FIXME HACK: we should not have to do this here. See related comment
|
||||||
|
// in GuiView::event() (QEvent::ShortcutOverride)
|
||||||
|
lyx_view_->menuBar()->hide();
|
||||||
|
}
|
||||||
|
|
||||||
// In order to avoid bad surprise in the middle of an operation,
|
// In order to avoid bad surprise in the middle of an operation,
|
||||||
// we better stop the blinking cursor...
|
// we better stop the blinking cursor...
|
||||||
// the cursor gets restarted in GuiView::restartCursor()
|
// the cursor gets restarted in GuiView::restartCursor()
|
||||||
stopBlinkingCursor();
|
stopBlinkingCursor();
|
||||||
|
|
||||||
if (lyx_view_->isFullScreen() && lyx_view_->menuBar()->isVisible()) {
|
|
||||||
// FIXME: we should not have to do this here. See related comment in
|
|
||||||
// GuiView::event().
|
|
||||||
lyx_view_->menuBar()->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
theLyXFunc().setLyXView(lyx_view_);
|
theLyXFunc().setLyXView(lyx_view_);
|
||||||
theLyXFunc().processKeySym(key, mod);
|
theLyXFunc().processKeySym(key, mod);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user