mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fixes #756
This commit is contained in:
parent
d500ab59ea
commit
a0b6e4bb76
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue