mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-18 11:35:21 -04:00
Capitalize theme names
This commit is contained in:
@@ -73,7 +73,7 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
|
||||
/*---------------------------------------------------------*\
|
||||
| Load theme settings |
|
||||
\*---------------------------------------------------------*/
|
||||
ui->ComboBoxTheme->addItems({"auto", "light", "dark"});
|
||||
ui->ComboBoxTheme->addItems({"Auto", "Light", "Dark"});
|
||||
|
||||
json theme_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Theme");
|
||||
|
||||
@@ -84,7 +84,7 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->ComboBoxTheme->setCurrentText(QString::fromStdString(("light")));
|
||||
ui->ComboBoxTheme->setCurrentText(QString::fromStdString(("Light")));
|
||||
}
|
||||
|
||||
theme_initialized = true;
|
||||
|
||||
@@ -93,19 +93,19 @@ bool OpenRGBThemeManager::IsDarkTheme()
|
||||
/*-------------------------------------------------*\
|
||||
| Read the theme key and adjust accordingly |
|
||||
\*-------------------------------------------------*/
|
||||
std::string current_theme = "light";
|
||||
std::string current_theme = "Light";
|
||||
|
||||
if(theme_settings.contains("theme"))
|
||||
{
|
||||
current_theme = theme_settings["theme"];
|
||||
}
|
||||
|
||||
if(current_theme == "dark")
|
||||
if(current_theme == "Dark")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
else if(current_theme == "auto")
|
||||
else if(current_theme == "Auto")
|
||||
{
|
||||
QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user