Restrict SemiWhite pixel for dark embedded theme & allow embedded theme properties also when starting with other themes

This commit is contained in:
asava 2020-04-17 17:50:31 +03:00
parent 2e95c4bc54
commit 11b6542852
2 changed files with 13 additions and 14 deletions

View File

@ -2687,7 +2687,7 @@ GetEarlyUserSettings (
break; break;
} }
} }
if ((AsciiStriCmp (Prop->string, "embedded") == 0) || (AsciiStriCmp (Prop->string, "") == 0)) { // get embedded theme property even when starting with other themes, as they may be changed later
Prop = GetProperty (DictPointer, "EmbeddedThemeType"); Prop = GetProperty (DictPointer, "EmbeddedThemeType");
if (Prop && (Prop->type == kTagTypeString) && Prop->string) { if (Prop && (Prop->type == kTagTypeString) && Prop->string) {
if (AsciiStriCmp (Prop->string, "Dark") == 0) { if (AsciiStriCmp (Prop->string, "Dark") == 0) {
@ -2702,7 +2702,6 @@ GetEarlyUserSettings (
} }
} }
} }
}
} else if (Prop == NULL) { } else if (Prop == NULL) {
Prop = GetProperty (DictPointer, "EmbeddedThemeType"); Prop = GetProperty (DictPointer, "EmbeddedThemeType");
if (Prop && (Prop->type == kTagTypeString) && Prop->string) { if (Prop && (Prop->type == kTagTypeString) && Prop->string) {

View File

@ -159,7 +159,7 @@ void XTheme::LoadFontImage(IN BOOLEAN UseEmbedded, IN INTN Rows, IN INTN Cols)
) { ) {
PixelPtr->Reserved = 0; //if a pixel has same color as first pixel then it will be transparent PixelPtr->Reserved = 0; //if a pixel has same color as first pixel then it will be transparent
//} else if (ThemeX.DarkEmbedded) { //} else if (ThemeX.DarkEmbedded) {
} else if (!ThemeX.Daylight) { } else if (ThemeX.embedded && !ThemeX.Daylight) {
*PixelPtr = SemiWhitePixel; //special case to change a text to semi white, not blue pixels *PixelPtr = SemiWhitePixel; //special case to change a text to semi white, not blue pixels
} }
FontPtr[Ypos + x] = *PixelPtr++; //not (x, YPos) !!! FontPtr[Ypos + x] = *PixelPtr++; //not (x, YPos) !!!