Don't set FONT_ALFA when using dark embedded

This commit is contained in:
asava 2020-04-19 13:26:13 +03:00
parent 73f5205891
commit 7058252f89

View File

@ -2674,8 +2674,7 @@ GetEarlyUserSettings (
ThemeX.Daylight = (NowHour > 8) && (NowHour < 20);
Prop = GetProperty (DictPointer, "Theme");
if (Prop != NULL) {
if ((Prop->type == kTagTypeString) && Prop->string) {
if (Prop != NULL && (Prop->type == kTagTypeString) && Prop->string) {
ThemeX.Theme.takeValueFrom(Prop->string);
GlobalConfig.Theme = PoolPrint (L"%a", Prop->string);
DBG ("Default theme: %ls\n", GlobalConfig.Theme);
@ -2687,34 +2686,19 @@ GetEarlyUserSettings (
break;
}
}
}
// get embedded theme property even when starting with other themes, as they may be changed later
Prop = GetProperty (DictPointer, "EmbeddedThemeType");
if (Prop && (Prop->type == kTagTypeString) && Prop->string) {
if (AsciiStriCmp (Prop->string, "Dark") == 0) {
ThemeX.DarkEmbedded = TRUE;
ThemeX.Font = FONT_GRAY;
//ThemeX.Font = FONT_GRAY;
} else if (AsciiStriCmp (Prop->string, "Light") == 0) {
ThemeX.DarkEmbedded = FALSE;
ThemeX.Font = FONT_ALFA;
} else if (AsciiStriCmp (Prop->string, "DayTime") == 0) {
ThemeX.DarkEmbedded = !ThemeX.Daylight;
ThemeX.Font = ThemeX.Daylight?FONT_ALFA:FONT_GRAY;
}
}
}
} else if (Prop == NULL) {
Prop = GetProperty (DictPointer, "EmbeddedThemeType");
if (Prop && (Prop->type == kTagTypeString) && Prop->string) {
if (AsciiStriCmp (Prop->string, "Dark") == 0) {
ThemeX.DarkEmbedded = TRUE;
ThemeX.Font = FONT_GRAY;
} else if (AsciiStriCmp (Prop->string, "Light") == 0) {
ThemeX.DarkEmbedded = FALSE;
ThemeX.Font = FONT_ALFA;
//ThemeX.Font = FONT_ALFA;
} else if (AsciiStriCmp (Prop->string, "Daytime") == 0) {
ThemeX.DarkEmbedded = !ThemeX.Daylight;
ThemeX.Font = ThemeX.Daylight?FONT_ALFA:FONT_GRAY;
}
//ThemeX.Font = ThemeX.Daylight?FONT_ALFA:FONT_GRAY;
}
}
Prop = GetProperty (DictPointer, "PlayAsync"); //PlayAsync