Use Alt-Escape to float and unfloat dock widgets.

For some reason, redocking is not working for me at all. This
key seems free.
This commit is contained in:
Richard Kimberly Heck 2023-07-26 14:24:37 -04:00
parent c609e9cbcf
commit 926ae84921
2 changed files with 9 additions and 0 deletions

View File

@ -48,6 +48,9 @@
creating a link (and are only available when hyperref is used). There is a creating a link (and are only available when hyperref is used). There is a
checkbox "No Hyperlink" for this purpose. checkbox "No Hyperlink" for this purpose.
* Alt-Escape can be used to 'float' and redock widgets like the table of contents
or source view.
!!Documents compilation process and images conversion !!Documents compilation process and images conversion
* LyX now uses utf8 encoding per default for all languages. This does * LyX now uses utf8 encoding per default for all languages. This does

View File

@ -49,6 +49,12 @@ void DockView::keyPressEvent(QKeyEvent * ev)
} }
mw->activateWindow(); mw->activateWindow();
mw->setFocus(); mw->setFocus();
Qt::KeyboardModifiers mod = ev->modifiers();
if (mod & Qt::AltModifier) {
(setFloating(!isFloating()));
ev->accept();
return;
}
if (isFloating()) if (isFloating())
hide(); hide();
ev->accept(); ev->accept();