From f6d5896bc74c66f9b99694a05760721c97bfbbec Mon Sep 17 00:00:00 2001 From: Neui Date: Thu, 10 May 2018 17:24:50 +0200 Subject: [PATCH] Qt: Save and restore main window size and position --- Source/Core/DolphinQt2/MainWindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/DolphinQt2/MainWindow.cpp b/Source/Core/DolphinQt2/MainWindow.cpp index 25413a10bd..3b0e796735 100644 --- a/Source/Core/DolphinQt2/MainWindow.cpp +++ b/Source/Core/DolphinQt2/MainWindow.cpp @@ -113,6 +113,7 @@ MainWindow::MainWindow(std::unique_ptr boot_parameters) : QMainW QSettings& settings = Settings::GetQSettings(); restoreState(settings.value(QStringLiteral("mainwindow/state")).toByteArray()); + restoreGeometry(settings.value(QStringLiteral("mainwindow/geometry")).toByteArray()); m_render_widget_size = QSize(SConfig::GetInstance().iRenderWindowWidth, SConfig::GetInstance().iRenderWindowHeight); @@ -128,6 +129,7 @@ MainWindow::~MainWindow() QSettings& settings = Settings::GetQSettings(); settings.setValue(QStringLiteral("mainwindow/state"), saveState()); + settings.setValue(QStringLiteral("mainwindow/geometry"), saveGeometry()); SConfig::GetInstance().iRenderWindowWidth = m_render_widget_size.width(); SConfig::GetInstance().iRenderWindowHeight = m_render_widget_size.height();