diff --git a/launcher/ui/widgets/MinecraftSettingsWidget.cpp b/launcher/ui/widgets/MinecraftSettingsWidget.cpp index 2f22ae54a..07761207a 100644 --- a/launcher/ui/widgets/MinecraftSettingsWidget.cpp +++ b/launcher/ui/widgets/MinecraftSettingsWidget.cpp @@ -68,7 +68,6 @@ MinecraftSettingsWidget::MinecraftSettingsWidget(MinecraftInstancePtr instance, tr("Warning: The maximized option is " "not fully supported on this Minecraft version.")); - m_ui->miscellaneousSettingsBox->setCheckable(true); m_ui->consoleSettingsBox->setCheckable(true); m_ui->windowSizeGroupBox->setCheckable(true); m_ui->nativeWorkaroundsGroupBox->setCheckable(true); @@ -136,11 +135,14 @@ void MinecraftSettingsWidget::loadSettings() settings = APPLICATION->settings(); // Game Window - m_ui->windowSizeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideWindow").toBool()); + m_ui->windowSizeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideWindow").toBool() || + settings->get("OverrideMiscellaneous").toBool()); m_ui->windowSizeGroupBox->setChecked(settings->get("OverrideWindow").toBool()); m_ui->maximizedCheckBox->setChecked(settings->get("LaunchMaximized").toBool()); m_ui->windowWidthSpinBox->setValue(settings->get("MinecraftWinWidth").toInt()); m_ui->windowHeightSpinBox->setValue(settings->get("MinecraftWinHeight").toInt()); + m_ui->closeAfterLaunchCheck->setChecked(settings->get("CloseAfterLaunch").toBool()); + m_ui->quitAfterGameStopCheck->setChecked(settings->get("QuitAfterGameStop").toBool()); // Game Time m_ui->gameTimeGroupBox->setChecked(m_instance == nullptr || settings->get("OverrideGameTime").toBool()); @@ -155,11 +157,6 @@ void MinecraftSettingsWidget::loadSettings() m_ui->autoCloseConsoleCheck->setChecked(settings->get("AutoCloseConsole").toBool()); m_ui->showConsoleErrorCheck->setChecked(settings->get("ShowConsoleOnError").toBool()); - // Miscellaneous - m_ui->miscellaneousSettingsBox->setChecked(settings->get("OverrideMiscellaneous").toBool()); - m_ui->closeAfterLaunchCheck->setChecked(settings->get("CloseAfterLaunch").toBool()); - m_ui->quitAfterGameStopCheck->setChecked(settings->get("QuitAfterGameStop").toBool()); - if (m_javaSettings != nullptr) m_javaSettings->loadSettings(); @@ -242,19 +239,6 @@ void MinecraftSettingsWidget::saveSettings() { SettingsObject::Lock lock(settings); - // Miscellaneous - bool miscellaneous = m_instance == nullptr || m_ui->miscellaneousSettingsBox->isChecked(); - - if (m_instance != nullptr) - settings->set("OverrideMiscellaneous", miscellaneous); - - if (miscellaneous) { - settings->set("CloseAfterLaunch", m_ui->closeAfterLaunchCheck->isChecked()); - settings->set("QuitAfterGameStop", m_ui->quitAfterGameStopCheck->isChecked()); - } else { - settings->reset("CloseAfterLaunch"); - settings->reset("QuitAfterGameStop"); - } // Console bool console = m_instance == nullptr || m_ui->consoleSettingsBox->isChecked(); @@ -272,20 +256,26 @@ void MinecraftSettingsWidget::saveSettings() settings->reset("ShowConsoleOnError"); } - // Window Size + // Game Window bool window = m_instance == nullptr || m_ui->windowSizeGroupBox->isChecked(); - if (m_instance != nullptr) + if (m_instance != nullptr) { settings->set("OverrideWindow", window); + settings->set("OverrideMiscellaneous", window); + } if (window) { settings->set("LaunchMaximized", m_ui->maximizedCheckBox->isChecked()); settings->set("MinecraftWinWidth", m_ui->windowWidthSpinBox->value()); settings->set("MinecraftWinHeight", m_ui->windowHeightSpinBox->value()); + settings->set("CloseAfterLaunch", m_ui->closeAfterLaunchCheck->isChecked()); + settings->set("QuitAfterGameStop", m_ui->quitAfterGameStopCheck->isChecked()); } else { settings->reset("LaunchMaximized"); settings->reset("MinecraftWinWidth"); settings->reset("MinecraftWinHeight"); + settings->reset("CloseAfterLaunch"); + settings->reset("QuitAfterGameStop"); } // Custom Commands diff --git a/launcher/ui/widgets/MinecraftSettingsWidget.ui b/launcher/ui/widgets/MinecraftSettingsWidget.ui index 0edbeacb7..b71250c47 100644 --- a/launcher/ui/widgets/MinecraftSettingsWidget.ui +++ b/launcher/ui/widgets/MinecraftSettingsWidget.ui @@ -58,9 +58,9 @@ 0 - -125 + 0 603 - 786 + 744 @@ -200,6 +200,59 @@ + + + + Close the launcher after the game window opens + + + + + + + Quit the launcher after the game window closes + + + + + + + + + + true + + + &Console Window + + + false + + + false + + + + + + Show console window while the game is running + + + + + + + Automatically close console window when the game quits + + + + + + + Show console window when the game crashes + + + @@ -253,6 +306,13 @@ false + + + + Singleplayer world + + + @@ -263,14 +323,7 @@ - - - - Singleplayer world - - - - + @@ -322,74 +375,6 @@ - - - - true - - - &Console - - - false - - - false - - - - - - Show console while the game is running - - - - - - - Automatically close console when the game quits - - - - - - - Show console when the game crashes - - - - - - - - - - &Miscellaneous - - - false - - - false - - - - - - Close the launcher after game window opens - - - - - - - Quit the launcher after game window closes - - - - - - @@ -698,8 +683,6 @@ showConsoleCheck autoCloseConsoleCheck showConsoleErrorCheck - closeAfterLaunchCheck - quitAfterGameStopCheck javaScrollArea scrollArea_2 onlineFixes