Commit 16c6c279 authored by Eike Ziller's avatar Eike Ziller

Adapt default window size to larger window borders.

Also remove old compat settings reading code.

Change-Id: I460322e4ee5167f98ee2c2f258cee956c70e1612
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent 3eed8167
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment