From: Richard Kimberly Heck Date: Wed, 26 Jul 2023 18:24:37 +0000 (-0400) Subject: Use Alt-Escape to float and unfloat dock widgets. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=926ae84921dbb99f925546f8f93d1790b945ef8e;p=features.git Use Alt-Escape to float and unfloat dock widgets. For some reason, redocking is not working for me at all. This key seems free. --- diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES index f47805bf89..a31b722066 100644 --- a/lib/RELEASE-NOTES +++ b/lib/RELEASE-NOTES @@ -48,6 +48,9 @@ creating a link (and are only available when hyperref is used). There is a 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 * LyX now uses utf8 encoding per default for all languages. This does diff --git a/src/frontends/qt/DockView.cpp b/src/frontends/qt/DockView.cpp index d6ba3c0ba9..ef204e2793 100644 --- a/src/frontends/qt/DockView.cpp +++ b/src/frontends/qt/DockView.cpp @@ -49,6 +49,12 @@ void DockView::keyPressEvent(QKeyEvent * ev) } mw->activateWindow(); mw->setFocus(); + Qt::KeyboardModifiers mod = ev->modifiers(); + if (mod & Qt::AltModifier) { + (setFloating(!isFloating())); + ev->accept(); + return; + } if (isFloating()) hide(); ev->accept();