Reset tint/saturation on theme change

As requested in #18802
This commit is contained in:
Henrik Rydgård committed 2024-10-23 15:30:33 +02:00
1 parent 671ba6356b
commit abe27dcb64
3 files changed
+15 -4

No files matched your search

+5
View File
@@ -1098,6 +1098,11 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
PopupMultiChoiceDynamic *theme = systemSettings->Add(new PopupMultiChoiceDynamic(&g_Config.sThemeName, sy->T("Theme"), GetThemeInfoNames(), I18NCat::THEMES, screenManager()));
theme->OnChoice.Add([=](EventParams &e) {
UpdateTheme(screenManager()->getUIContext());
// Reset the tint/saturation if the theme changed.
if (e.b) {
g_Config.fUITint = 0.0f;
g_Config.fUISaturation = 1.0f;
}
return UI::EVENT_CONTINUE;
});