change background of embedded theme

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2020-04-11 23:08:03 +03:00
parent da0022e7c5
commit de181aecfb
2 changed files with 9 additions and 2 deletions

View File

@ -1734,7 +1734,7 @@ FindBootArgs(IN LOADER_ENTRY *Entry)
dtLength = &bootArgs2->deviceTreeLength;
KernelSlide = bootArgs2->kslide;
DBG_RT(Entry, "Found bootArgs2 at 0x%8s, DevTree at %p\n", ptr, dtRoot);
DBG_RT(Entry, "Found bootArgs2 at 0x%llX, DevTree at 0x%llX\n", (UINTN)ptr, (UINTN)bootArgs2->deviceTreeP);
//DBG("bootArgs2->kaddr = 0x%08X and bootArgs2->ksize = 0x%08X\n", bootArgs2->kaddr, bootArgs2->ksize);
//DBG("bootArgs2->efiMode = 0x%02X\n", bootArgs2->efiMode);
DBG_RT(Entry, "bootArgs2->CommandLine = %s\n", bootArgs2->CommandLine);

View File

@ -457,7 +457,7 @@ void XTheme::ClearScreen() //and restore background and banner
if (BanHeight < 2) {
BanHeight = ((UGAHeight - (int)(LayoutHeight * Scale)) >> 1);
}
egClearScreen(&MenuBackgroundPixel);
// egClearScreen(&MenuBackgroundPixel); //not needed
if (!(HideUIFlags & HIDEUI_FLAG_BANNER)) {
//Banner image prepared before
if (!Banner.isEmpty()) {
@ -495,6 +495,13 @@ void XTheme::ClearScreen() //and restore background and banner
}
if (Background.isEmpty()) {
Background = XImage(UGAWidth, UGAHeight);
if (embedded) {
if (Daylight) {
BlueBackgroundPixel = StdBackgroundPixel;
} else {
BlueBackgroundPixel = DarkEmbeddedBackgroundPixel;
}
}
Background.Fill(BlueBackgroundPixel); //blue opaque. May be better to set black opaque?
}
// now we are sure Background has UGA sizes