This commit is contained in:
fourtf 2018-10-29 22:11:42 +01:00
parent d500ab59ea
commit a0b6e4bb76

View file

@ -288,6 +288,15 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
Window &window = createWindow(type);
if (window_obj.value("state") == "maximized")
{
window.setWindowState(Qt::WindowMaximized);
}
else if (window_obj.value("state") == "minimized")
{
window.setWindowState(Qt::WindowMinimized);
}
if (type == WindowType::Main)
{
mainWindow_ = &window;
@ -414,6 +423,15 @@ void WindowManager::save()
case WindowType::Attached:;
}
if (window->isMaximized())
{
window_obj.insert("state", "maximized");
}
else if (window->isMinimized())
{
window_obj.insert("state", "minimized");
}
// window geometry
window_obj.insert("x", window->x());
window_obj.insert("y", window->y());