auto dark mode restored, fix merging

This commit is contained in:
Nayla Hanegan 2024-08-23 14:48:50 -04:00
commit 2670ec26f6
8 changed files with 61 additions and 223 deletions

View file

@ -203,7 +203,8 @@ void Settings::ApplyStyle()
// which would select Qt's default theme, but unlike other OSes we don't automatically get a
// default dark theme on Windows when the user has selected dark mode in the Windows settings.
// So manually check if the user wants dark mode and, if yes, load our embedded dark theme.
if (style_type == StyleType::Dark && IsSystemDark())
QString productName = QSysInfo::prettyProductName();
if (!productName.contains(QStringLiteral("Windows 11"), Qt::CaseInsensitive) && IsSystemDark())
{
QFile file(QStringLiteral(":/dolphin_dark_win/dark.qss"));
if (file.open(QFile::ReadOnly))
@ -539,6 +540,15 @@ bool Settings::GetCheatsEnabled() const
return Config::Get(Config::MAIN_ENABLE_CHEATS);
}
void Settings::SetCheatsEnabled(bool enabled)
{
if (Config::Get(Config::MAIN_ENABLE_CHEATS) != enabled)
{
Config::SetBaseOrCurrent(Config::MAIN_ENABLE_CHEATS, enabled);
emit EnableCheatsChanged(enabled);
}
}
void Settings::SetDebugModeEnabled(bool enabled)
{
if (AchievementManager::GetInstance().IsHardcoreModeActive())