forked from qt-creator/qt-creator
Adapt default window size to larger window borders.
Also remove old compat settings reading code. Change-Id: I460322e4ee5167f98ee2c2f258cee956c70e1612 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -1203,27 +1203,10 @@ void MainWindow::readSettings()
|
||||
QColor(Utils::StyleHelper::DEFAULT_BASE_COLOR)).value<QColor>());
|
||||
}
|
||||
|
||||
// TODO compat for <= 2.1, remove later
|
||||
if (m_settings->contains(QLatin1String(geometryKey))) {
|
||||
const QVariant geom = m_settings->value(QLatin1String(geometryKey));
|
||||
if (geom.isValid()) {
|
||||
setGeometry(geom.toRect());
|
||||
} else {
|
||||
resize(1024, 700);
|
||||
}
|
||||
if (m_settings->value(QLatin1String(maxKey), false).toBool())
|
||||
setWindowState(Qt::WindowMaximized);
|
||||
setFullScreen(m_settings->value(QLatin1String(fullScreenKey), false).toBool());
|
||||
|
||||
m_settings->remove(QLatin1String(geometryKey));
|
||||
m_settings->remove(QLatin1String(maxKey));
|
||||
m_settings->remove(QLatin1String(fullScreenKey));
|
||||
} else {
|
||||
if (!restoreGeometry(m_settings->value(QLatin1String(windowGeometryKey)).toByteArray())) {
|
||||
resize(1024, 700);
|
||||
}
|
||||
restoreState(m_settings->value(QLatin1String(windowStateKey)).toByteArray());
|
||||
if (!restoreGeometry(m_settings->value(QLatin1String(windowGeometryKey)).toByteArray())) {
|
||||
resize(1008, 700); // size without window decoration
|
||||
}
|
||||
restoreState(m_settings->value(QLatin1String(windowStateKey)).toByteArray());
|
||||
|
||||
m_settings->endGroup();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user