mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 01:22:37 -06:00
Merge pull request #1125 from yuriks/uilayout-config
citra-qt: Separate UI layout state in a separate section of the config
This commit is contained in:
commit
2aad510c84
1 changed files with 7 additions and 0 deletions
|
@ -130,11 +130,14 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
|
||||||
|
|
||||||
// Restore UI state
|
// Restore UI state
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
|
settings.beginGroup("UILayout");
|
||||||
restoreGeometry(settings.value("geometry").toByteArray());
|
restoreGeometry(settings.value("geometry").toByteArray());
|
||||||
restoreState(settings.value("state").toByteArray());
|
restoreState(settings.value("state").toByteArray());
|
||||||
render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray());
|
render_window->restoreGeometry(settings.value("geometryRenderWindow").toByteArray());
|
||||||
microProfileDialog->restoreGeometry(settings.value("microProfileDialogGeometry").toByteArray());
|
microProfileDialog->restoreGeometry(settings.value("microProfileDialogGeometry").toByteArray());
|
||||||
microProfileDialog->setVisible(settings.value("microProfileDialogVisible").toBool());
|
microProfileDialog->setVisible(settings.value("microProfileDialogVisible").toBool());
|
||||||
|
settings.endGroup();
|
||||||
|
|
||||||
ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer);
|
ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer);
|
||||||
SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked());
|
SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked());
|
||||||
|
@ -439,11 +442,15 @@ void GMainWindow::OnConfigure() {
|
||||||
void GMainWindow::closeEvent(QCloseEvent* event) {
|
void GMainWindow::closeEvent(QCloseEvent* event) {
|
||||||
// Save window layout
|
// Save window layout
|
||||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra");
|
QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Citra team", "Citra");
|
||||||
|
|
||||||
|
settings.beginGroup("UILayout");
|
||||||
settings.setValue("geometry", saveGeometry());
|
settings.setValue("geometry", saveGeometry());
|
||||||
settings.setValue("state", saveState());
|
settings.setValue("state", saveState());
|
||||||
settings.setValue("geometryRenderWindow", render_window->saveGeometry());
|
settings.setValue("geometryRenderWindow", render_window->saveGeometry());
|
||||||
settings.setValue("microProfileDialogGeometry", microProfileDialog->saveGeometry());
|
settings.setValue("microProfileDialogGeometry", microProfileDialog->saveGeometry());
|
||||||
settings.setValue("microProfileDialogVisible", microProfileDialog->isVisible());
|
settings.setValue("microProfileDialogVisible", microProfileDialog->isVisible());
|
||||||
|
settings.endGroup();
|
||||||
|
|
||||||
settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
|
settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
|
||||||
settings.setValue("displayTitleBars", ui.actionDisplay_widget_title_bars->isChecked());
|
settings.setValue("displayTitleBars", ui.actionDisplay_widget_title_bars->isChecked());
|
||||||
settings.setValue("firstStart", false);
|
settings.setValue("firstStart", false);
|
||||||
|
|
Loading…
Reference in a new issue