Permalink
Browse files

Merge pull request #6802 from Neui/qt-remember-main-window-position-a…

…nd-size

Qt: Save and restore main window size and position
  • Loading branch information...
spycrab committed May 10, 2018
2 parents 2891504 + f6d5896 commit 6e9d0ff6de961b211d3d010c3633f2d415eb850f
Showing with 2 additions and 0 deletions.
  1. +2 −0 Source/Core/DolphinQt2/MainWindow.cpp
@@ -113,6 +113,7 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> 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();

0 comments on commit 6e9d0ff

Please sign in to comment.