Skip to content

Commit

Permalink
Merge branch 'bugfix-418' into testing_0.37.2
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Jul 23, 2024
2 parents fdfb43b + ff9449a commit 8d0f497
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,22 +572,28 @@ void MainWindow::setLayoutGeometry()
|| layoutProfile.mainState != QByteArray() )
{
restoreGeometry(layoutProfile.mainGeometry);
#if (QT_VERSION < QT_VERSION_CHECK(6, 3, 0))
// workaround for QTBUG-46620
if ( isMaximized() )
{
const QList<QScreen *> &screens = QGuiApplication::screens();
setGeometry( screens[0]->availableGeometry() );
}
#endif
restoreState(layoutProfile.mainState);
darkLightModeSwith->setChecked(layoutProfile.darkMode);
}
else
{
restoreGeometry(settings.value("geometry").toByteArray());
#if (QT_VERSION < QT_VERSION_CHECK(6, 3, 0))
// workaround for QTBUG-46620
if ( isMaximized() )
{
const QList<QScreen *> &screens = QGuiApplication::screens();
setGeometry( screens[0]->availableGeometry() );
}
#endif
restoreState(settings.value("windowState").toByteArray());
// leave dark mode as is
}
Expand Down Expand Up @@ -705,11 +711,14 @@ void MainWindow::setupLayoutMenu()
|| layoutProfile.mainState != QByteArray() )
{
restoreGeometry(layoutProfile.mainGeometry);
#if (QT_VERSION < QT_VERSION_CHECK(6, 3, 0))
// workaround for QTBUG-46620
if ( isMaximized() )
{
const QList<QScreen *> &screens = QGuiApplication::screens();
setGeometry( screens[0]->availableGeometry() );
}
#endif
restoreState(layoutProfile.mainState);
darkLightModeSwith->setChecked(isFusionStyle && layoutProfile.darkMode);
}
Expand Down

0 comments on commit 8d0f497

Please sign in to comment.