Skip to content

Commit

Permalink
Fixed #418 - Windows State/Size does not save in case of fullscreen
Browse files Browse the repository at this point in the history
It seems to be a QT issue. The workaround described in the issue
QTBUG-46620 was applied, but not everywhere restoreGeometry is called, as it caused
other issues in QT, which are also detailed in the bug report. While it works better,
it is not perfect.

Bug QTBUG-46620 was fixed in QT 6.3.0, so it is necessary to determine how this workaround
behaves under this QT version. This could affect Windows users.
  • Loading branch information
foldynl committed Jul 21, 2024
1 parent 643a164 commit a7ed96c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,16 @@ void MainWindow::setLayoutGeometry()
|| layoutProfile.mainState != QByteArray() )
{
restoreGeometry(layoutProfile.mainGeometry);
if ( isMaximized() )
setGeometry( QApplication::desktop()->availableGeometry( this ) );
restoreState(layoutProfile.mainState);
darkLightModeSwith->setChecked(layoutProfile.darkMode);
}
else
{
restoreGeometry(settings.value("geometry").toByteArray());
if ( isMaximized() )
setGeometry( QApplication::desktop()->availableGeometry( this ) );
restoreState(settings.value("windowState").toByteArray());
// leave dark mode as is
}
Expand Down

0 comments on commit a7ed96c

Please sign in to comment.