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 448e4c4 + 75c4f70 commit fdfb43b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,15 +573,21 @@ void MainWindow::setLayoutGeometry()
{
restoreGeometry(layoutProfile.mainGeometry);
if ( isMaximized() )
setGeometry( QApplication::desktop()->availableGeometry( this ) );
{
const QList<QScreen *> &screens = QGuiApplication::screens();
setGeometry( screens[0]->availableGeometry() );
}
restoreState(layoutProfile.mainState);
darkLightModeSwith->setChecked(layoutProfile.darkMode);
}
else
{
restoreGeometry(settings.value("geometry").toByteArray());
if ( isMaximized() )
setGeometry( QApplication::desktop()->availableGeometry( this ) );
{
const QList<QScreen *> &screens = QGuiApplication::screens();
setGeometry( screens[0]->availableGeometry() );
}
restoreState(settings.value("windowState").toByteArray());
// leave dark mode as is
}
Expand Down Expand Up @@ -699,6 +705,11 @@ void MainWindow::setupLayoutMenu()
|| layoutProfile.mainState != QByteArray() )
{
restoreGeometry(layoutProfile.mainGeometry);
if ( isMaximized() )
{
const QList<QScreen *> &screens = QGuiApplication::screens();
setGeometry( screens[0]->availableGeometry() );
}
restoreState(layoutProfile.mainState);
darkLightModeSwith->setChecked(isFusionStyle && layoutProfile.darkMode);
}
Expand Down

0 comments on commit fdfb43b

Please sign in to comment.