]> git.lyx.org Git - features.git/commitdiff
Use Alt-Escape to float and unfloat dock widgets.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Wed, 26 Jul 2023 18:24:37 +0000 (14:24 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Wed, 26 Jul 2023 18:26:02 +0000 (14:26 -0400)
For some reason, redocking is not working for me at all. This
key seems free.

lib/RELEASE-NOTES
src/frontends/qt/DockView.cpp

index f47805bf895b3ccdcd185f1cf70391b2b18bd593..a31b7220667097d358d448b19d36e69f716aceff 100644 (file)
@@ -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
index d6ba3c0ba913eb8d444a01e6ffd4115dd9609ed2..ef204e27932c96fa664c93ed591bd622a7fdce52 100644 (file)
@@ -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();