mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-08 15:24:33 +00:00
Qt: Save position of settings windows
This commit is contained in:
@@ -102,6 +102,9 @@ ControllerSettingsWindow::ControllerSettingsWindow(INISettingsInterface* game_si
|
||||
}
|
||||
|
||||
createWidgets();
|
||||
|
||||
if (isEditingGlobalSettings())
|
||||
QtUtils::RestoreWindowGeometry("ControllerSettingsWindow", this);
|
||||
}
|
||||
|
||||
ControllerSettingsWindow::~ControllerSettingsWindow() = default;
|
||||
@@ -498,7 +501,9 @@ void ControllerSettingsWindow::createWidgets()
|
||||
void ControllerSettingsWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
QWidget::closeEvent(event);
|
||||
emit windowClosed();
|
||||
|
||||
if (isEditingGlobalSettings())
|
||||
QtUtils::SaveWindowGeometry("ControllerSettingsWindow", this);
|
||||
}
|
||||
|
||||
void ControllerSettingsWindow::updateListDescription(u32 global_slot, ControllerBindingWidget* widget)
|
||||
|
||||
@@ -79,10 +79,6 @@ public:
|
||||
void clearSettingValue(const char* section, const char* key);
|
||||
void saveAndReloadGameSettings();
|
||||
|
||||
Q_SIGNALS:
|
||||
void windowClosed();
|
||||
void inputProfileSwitched();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ SettingsWindow::SettingsWindow() : QWidget()
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
addPages();
|
||||
connectUi();
|
||||
|
||||
QtUtils::RestoreWindowGeometry("SettingsWindow", this);
|
||||
}
|
||||
|
||||
SettingsWindow::SettingsWindow(const GameList::Entry* entry, std::unique_ptr<INISettingsInterface> sif)
|
||||
@@ -78,6 +80,8 @@ void SettingsWindow::closeEvent(QCloseEvent* event)
|
||||
// we need to clean up ourselves, since we're not modal
|
||||
if (isPerGameSettings())
|
||||
deleteLater();
|
||||
else
|
||||
QtUtils::SaveWindowGeometry("SettingsWindow", this);
|
||||
}
|
||||
|
||||
void SettingsWindow::addPages()
|
||||
|
||||
Reference in New Issue
Block a user