r23590 by jghali - Restore main window maximization state handling in setupMainWindow()
scribus-commit
scribus-commit at lists.scribus.net
Sat Apr 11 15:38:22 UTC 2020
Author: jghali
Date: Sat Apr 11 15:38:22 2020
New Revision: 23590
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23590
Log:
Restore main window maximization state handling in setupMainWindow()
Modified:
trunk/Scribus/scribus/scribus.cpp
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23590&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Apr 11 15:38:22 2020
@@ -484,7 +484,7 @@
}
const WindowPrefs& mainWinSettings = m_prefsManager.appPrefs.uiPrefs.mainWinSettings;
- QWindow* w = ScCore->primaryMainWindow()->windowHandle();
+ QWindow* w = windowHandle();
QList<QScreen*> screens = QGuiApplication::screens();
QScreen* s = nullptr;
if (w != nullptr)
@@ -499,6 +499,9 @@
r = s->geometry();
move(r.left() + abs(mainWinSettings.xPosition), r.top() + abs(mainWinSettings.yPosition));
resize(mainWinSettings.width, mainWinSettings.height);
+
+ if (mainWinSettings.maximized)
+ this->setWindowState((this->windowState() & ~Qt::WindowMinimized) | Qt::WindowMaximized);
if (!m_prefsManager.appPrefs.uiPrefs.mainWinState.isEmpty())
restoreState(m_prefsManager.appPrefs.uiPrefs.mainWinState);
More information about the scribus-commit
mailing list