mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 06:08:50 +00:00
auto dark mode restored, fix merging
This commit is contained in:
parent
4ced9ad700
commit
2670ec26f6
8 changed files with 61 additions and 223 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue