File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -573,15 +573,21 @@ void MainWindow::setLayoutGeometry()
573
573
{
574
574
restoreGeometry (layoutProfile.mainGeometry );
575
575
if ( isMaximized () )
576
- setGeometry ( QApplication::desktop ()->availableGeometry ( this ) );
576
+ {
577
+ const QList<QScreen *> &screens = QGuiApplication::screens ();
578
+ setGeometry ( screens[0 ]->availableGeometry () );
579
+ }
577
580
restoreState (layoutProfile.mainState );
578
581
darkLightModeSwith->setChecked (layoutProfile.darkMode );
579
582
}
580
583
else
581
584
{
582
585
restoreGeometry (settings.value (" geometry" ).toByteArray ());
583
586
if ( isMaximized () )
584
- setGeometry ( QApplication::desktop ()->availableGeometry ( this ) );
587
+ {
588
+ const QList<QScreen *> &screens = QGuiApplication::screens ();
589
+ setGeometry ( screens[0 ]->availableGeometry () );
590
+ }
585
591
restoreState (settings.value (" windowState" ).toByteArray ());
586
592
// leave dark mode as is
587
593
}
@@ -699,6 +705,11 @@ void MainWindow::setupLayoutMenu()
699
705
|| layoutProfile.mainState != QByteArray () )
700
706
{
701
707
restoreGeometry (layoutProfile.mainGeometry );
708
+ if ( isMaximized () )
709
+ {
710
+ const QList<QScreen *> &screens = QGuiApplication::screens ();
711
+ setGeometry ( screens[0 ]->availableGeometry () );
712
+ }
702
713
restoreState (layoutProfile.mainState );
703
714
darkLightModeSwith->setChecked (isFusionStyle && layoutProfile.darkMode );
704
715
}
You can’t perform that action at this time.
0 commit comments