Revert "fix: restore maximize geometry (#1013)"

This reverts commit cd560f85fd.
This commit is contained in:
xiaoyifang 2023-07-27 23:20:16 +08:00 committed by GitHub
parent 97a32e3dca
commit 88117306a7
3 changed files with 0 additions and 15 deletions

View file

@ -1107,11 +1107,6 @@ Class load()
if ( !mainWindowGeometry.isNull() )
c.mainWindowGeometry = QByteArray::fromBase64( mainWindowGeometry.toElement().text().toLatin1() );
QDomNode mainWindowMaximized = root.namedItem( "mainWindowMaximized" );
if ( !mainWindowMaximized.isNull() )
c.mainWindowMaximized = ( mainWindowMaximized.toElement().text() == "1" );
QDomNode dictInfoGeometry = root.namedItem( "dictInfoGeometry" );
if ( !dictInfoGeometry.isNull() )
@ -2100,10 +2095,6 @@ void save( Class const & c )
opt.appendChild( dd.createTextNode( QString::fromLatin1( c.mainWindowGeometry.toBase64() ) ) );
root.appendChild( opt );
opt = dd.createElement( "mainWindowMaximized" );
opt.appendChild( dd.createTextNode( c.mainWindowMaximized ? "1" : "0" ) );
root.appendChild( opt );
opt = dd.createElement( "dictInfoGeometry" );
opt.appendChild( dd.createTextNode( QString::fromLatin1( c.dictInfoGeometry.toBase64() ) ) );
root.appendChild( opt );

View file

@ -866,7 +866,6 @@ struct Class
QByteArray mainWindowState; // Binary state saved by QMainWindow
QByteArray mainWindowGeometry; // Geometry saved by QMainWindow
bool mainWindowMaximized = false;
MutedDictionaries mutedDictionaries; // Disabled via dictionary bar
MutedDictionaries popupMutedDictionaries; // Disabled via dictionary bar in popup

View file

@ -746,10 +746,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
if ( cfg.mainWindowGeometry.size() )
restoreGeometry( cfg.mainWindowGeometry );
if ( cfg.mainWindowMaximized ) {
showMaximized();
}
#if defined( Q_OS_LINUX )
#if ( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) )
defaultInterfaceStyle = QApplication::style()->name();
@ -1218,7 +1214,6 @@ void MainWindow::commitData()
// Save MainWindow state and geometry
cfg.mainWindowState = saveState();
cfg.mainWindowGeometry = saveGeometry();
cfg.mainWindowMaximized = isMaximized();
// Save popup window state and geometry
if ( scanPopup )