commit 1ae510b6287d5c96c3f106909c1cc8b0711b6d57
Author: Pavel Sanda <[email protected]>
Date: Sun Nov 22 11:54:58 2020 +0100
Erase white frame in fullscreen mode.
Backport 4eb791ff187741.
---
src/frontends/qt4/GuiView.cpp | 13 +++++++++++++
status.23x | 2 ++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index b710220..2a176be 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -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);
diff --git a/status.23x b/status.23x
index 28559c5..1c26349 100644
--- a/status.23x
+++ b/status.23x
@@ -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
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs