Complete Color Theme Lists (Fix #2672) (#2752)

This commit is contained in:
Maria 2021-09-14 16:24:47 +03:00 committed by GitHub
parent e219be4253
commit 417a0a2221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -21,10 +21,17 @@
* and for light - only light ones. * and for light - only light ones.
*/ */
const QHash<QString, ColorFlags> Configuration::relevantThemes = { const QHash<QString, ColorFlags> Configuration::relevantThemes = {
{ "ayu", DarkFlag }, { "consonance", DarkFlag }, { "darkda", DarkFlag }, { "ayu", DarkFlag }, { "basic", DarkFlag }, { "behelit", DarkFlag },
{ "onedark", DarkFlag }, { "solarized", DarkFlag }, { "zenburn", DarkFlag }, { "bold", DarkFlag }, { "bright", DarkFlag }, { "consonance", DarkFlag },
{ "cutter", LightFlag }, { "dark", LightFlag }, { "matrix", LightFlag }, { "darkda", DarkFlag }, { "defragger", DarkFlag }, { "focus", DarkFlag },
{ "tango", LightFlag }, { "white", LightFlag } { "gentoo", DarkFlag }, { "lima", DarkFlag }, { "monokai", DarkFlag },
{ "ogray", DarkFlag }, { "onedark", DarkFlag }, { "pink", DarkFlag },
{ "rasta", DarkFlag }, { "sepia", DarkFlag }, { "smyck", DarkFlag },
{ "solarized", DarkFlag }, { "twilight", DarkFlag }, { "white2", DarkFlag },
{ "xvilka", DarkFlag }, { "zenburn", DarkFlag },
{ "cga", LightFlag }, { "cutter", LightFlag }, { "dark", LightFlag },
{ "gb", LightFlag }, { "matrix", LightFlag }, { "tango", LightFlag },
{ "white", LightFlag }
}; };
static const QString DEFAULT_LIGHT_COLOR_THEME = "cutter"; static const QString DEFAULT_LIGHT_COLOR_THEME = "cutter";
static const QString DEFAULT_DARK_COLOR_THEME = "ayu"; static const QString DEFAULT_DARK_COLOR_THEME = "ayu";

View File

@ -23,6 +23,7 @@ void ColorThemeComboBox::updateFromConfig(bool interfaceThemeChanged)
clear(); clear();
for (const QString &theme : themes) { for (const QString &theme : themes) {
if (ThemeWorker().isCustomTheme(theme) if (ThemeWorker().isCustomTheme(theme)
|| !Configuration::relevantThemes[theme]
|| (Configuration::cutterInterfaceThemesList()[curInterfaceThemeIndex].flag || (Configuration::cutterInterfaceThemesList()[curInterfaceThemeIndex].flag
& Configuration::relevantThemes[theme])) { & Configuration::relevantThemes[theme])) {
addItem(theme); addItem(theme);