Allow to reset window size from launcher

This commit is contained in:
Klaus Basan
2019-04-29 22:41:10 +02:00
parent 8eff8cd3ba
commit ce534d2536
3 changed files with 27 additions and 20 deletions

View File

@@ -378,13 +378,14 @@ namespace BlackGui
{
if (!window) { return false; }
const QSettings settings("swift-project.org", this->getApplicationName());
const QString location = settings.fileName();
CLogMessage(this).info(u"GUI settings are here: '%1'") << location;
const QByteArray g = settings.value("geometry").toByteArray();
const QByteArray s = settings.value("windowState").toByteArray();
if (g.isEmpty() || s.isEmpty()) { return false; }
window->restoreGeometry(g);
window->restoreState(s);
const QString location = settings.fileName();
CLogMessage(this).info(u"GUI settings are here: '%1'") << location;
return true;
}