]> git.lyx.org Git - features.git/commitdiff
Erase white frame in fullscreen mode.
authorPavel Sanda <sanda@lyx.org>
Sun, 22 Nov 2020 10:54:58 +0000 (11:54 +0100)
committerPavel Sanda <sanda@lyx.org>
Sun, 22 Nov 2020 10:54:58 +0000 (11:54 +0100)
Backport 4eb791ff187741.

src/frontends/qt4/GuiView.cpp
status.23x

index b7102207cafd8324da3e36b86515d92a059c2643..2a176be8385283964fe370805d825263abd81eac 100644 (file)
@@ -4395,8 +4395,14 @@ bool GuiView::lfunUiToggle(string const & ui_component)
                //are the frames in default state?
                d.current_work_area_->setFrameStyle(QFrame::NoFrame);
                if (l == 0) {
+#if QT_VERSION >  0x050903
+                       setAttribute(Qt::WA_ContentsMarginsRespectsSafeArea, false);
+#endif
                        setContentsMargins(-2, -2, -2, -2);
                } else {
+#if QT_VERSION >  0x050903
+                       setAttribute(Qt::WA_ContentsMarginsRespectsSafeArea, true);
+#endif
                        setContentsMargins(0, 0, 0, 0);
                }
        } else
@@ -4413,6 +4419,9 @@ void GuiView::toggleFullScreen()
        if (isFullScreen()) {
                for (int i = 0; i != d.splitter_->count(); ++i)
                        d.tabWorkArea(i)->setFullScreen(false);
+#if QT_VERSION > 0x050903
+                 setAttribute(Qt::WA_ContentsMarginsRespectsSafeArea, true);
+#endif
                setContentsMargins(0, 0, 0, 0);
                setWindowState(windowState() ^ Qt::WindowFullScreen);
                restoreLayout();
@@ -4423,6 +4432,10 @@ void GuiView::toggleFullScreen()
                hideDialogs("prefs", 0);
                for (int i = 0; i != d.splitter_->count(); ++i)
                        d.tabWorkArea(i)->setFullScreen(true);
+#if QT_VERSION > 0x050903
+                 //Qt's 5.9.4 ba44cdae38406c safe area measures won't allow us to go negative in margins
+                 setAttribute(Qt::WA_ContentsMarginsRespectsSafeArea, false);
+#endif
                setContentsMargins(-2, -2, -2, -2);
                saveLayout();
                setWindowState(windowState() ^ Qt::WindowFullScreen);
index 28559c54ee0763438385c1bf1147b91f7c8ccda3..1c26349120ff1226ed8a2fb80fe9c3d0b7121af7 100644 (file)
@@ -124,6 +124,8 @@ What's new
 
 - Fix on-screen display of special math fonts (bug 11802).
 
+- Fix white frame border in fullscreen mode.
+
 
 * INTERNALS