Skip to content

Commit 6ac3fae

Browse files
RedBlackAkaCalcProgrammer1
authored andcommitted
Capitalize theme names
1 parent 29e384a commit 6ac3fae

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

qt/OpenRGBSettingsPage/OpenRGBSettingsPage.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
7373
/*---------------------------------------------------------*\
7474
| Load theme settings |
7575
\*---------------------------------------------------------*/
76-
ui->ComboBoxTheme->addItems({"auto", "light", "dark"});
76+
ui->ComboBoxTheme->addItems({"Auto", "Light", "Dark"});
7777

7878
json theme_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Theme");
7979

@@ -84,7 +84,7 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
8484
}
8585
else
8686
{
87-
ui->ComboBoxTheme->setCurrentText(QString::fromStdString(("light")));
87+
ui->ComboBoxTheme->setCurrentText(QString::fromStdString(("Light")));
8888
}
8989

9090
theme_initialized = true;

qt/OpenRGBThemeManager.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,19 @@ bool OpenRGBThemeManager::IsDarkTheme()
9393
/*-------------------------------------------------*\
9494
| Read the theme key and adjust accordingly |
9595
\*-------------------------------------------------*/
96-
std::string current_theme = "light";
96+
std::string current_theme = "Light";
9797

9898
if(theme_settings.contains("theme"))
9999
{
100100
current_theme = theme_settings["theme"];
101101
}
102102

103-
if(current_theme == "dark")
103+
if(current_theme == "Dark")
104104
{
105105
return true;
106106
}
107107
#ifdef _WIN32
108-
else if(current_theme == "auto")
108+
else if(current_theme == "Auto")
109109
{
110110
QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
111111

0 commit comments

Comments
 (0)