Erase white frame in fullscreen mode.

Backport 4eb791ff18.
This commit is contained in:
Pavel Sanda 2020-11-22 11:54:58 +01:00
parent f9f9fb661c
commit 1ae510b628
2 changed files with 15 additions and 0 deletions

View 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);

View 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