Better "default:"
This commit is contained in:
parent
3ae331a2b5
commit
6bcfbd66cf
@ -58,6 +58,7 @@ void themeStartup(ThemePreset preset) {
|
|||||||
|
|
||||||
switch (preset) {
|
switch (preset) {
|
||||||
case THEME_PRESET_LIGHT:
|
case THEME_PRESET_LIGHT:
|
||||||
|
default:
|
||||||
themeDefault = &themeLight;
|
themeDefault = &themeLight;
|
||||||
if (good_cfg)
|
if (good_cfg)
|
||||||
theme = config_lookup(cfg, "lightTheme");
|
theme = config_lookup(cfg, "lightTheme");
|
||||||
@ -68,13 +69,9 @@ void themeStartup(ThemePreset preset) {
|
|||||||
if (good_cfg)
|
if (good_cfg)
|
||||||
theme = config_lookup(cfg, "darkTheme");
|
theme = config_lookup(cfg, "darkTheme");
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
themeDefault = &themeDark;
|
|
||||||
if (good_cfg)
|
|
||||||
theme = config_lookup(cfg, "darkTheme");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (good_cfg){
|
if (good_cfg) {
|
||||||
if (theme != NULL) {
|
if (theme != NULL) {
|
||||||
if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text))
|
if (!colorFromSetting(config_setting_lookup(theme, "textColor"), &text))
|
||||||
text = themeDefault->textColor;
|
text = themeDefault->textColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user