[PATCH - resend] MdeModulePkg/BootLogoLib: Center logo 38.2% from top of screen


Patrick Rudolph
 

From: Tim Crawford <tcrawford@system76.com>

Use Microsoft's recommended positioning [1] for the boot logo.

We recommend that the logo is placed with its center at 38.2% from the
screen's top edge. This positioning is based on the golden ratio's
visual aesthetics and matches the Windows 10 design proportions.
[1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/boot=
-screen-components#position-the-logo-during-post

Based on Tim Crawford <tcrawford@system76.com> initial commit.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
---
MdeModulePkg/Include/Protocol/PlatformLogo.h | 3 ++-
MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 4 ++++
MdeModulePkg/Logo/Logo.c | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h b/MdeModulePkg/In=
clude/Protocol/PlatformLogo.h
index 55c9e08696..21a4c79e1d 100644
--- a/MdeModulePkg/Include/Protocol/PlatformLogo.h
+++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h
@@ -29,7 +29,8 @@ typedef enum {
EdkiiPlatformLogoDisplayAttributeCenterBottom,=0D
EdkiiPlatformLogoDisplayAttributeLeftBottom,=0D
EdkiiPlatformLogoDisplayAttributeCenterLeft,=0D
- EdkiiPlatformLogoDisplayAttributeCenter=0D
+ EdkiiPlatformLogoDisplayAttributeCenter,=0D
+ EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended=0D
} EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;=0D
=0D
/**=0D
diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/=
Library/BootLogoLib/BootLogoLib.c
index 134660f28d..d40c65b59f 100644
--- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
+++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c
@@ -173,6 +173,10 @@ BootLogoEnableLogo (
DestX =3D 0;=0D
DestY =3D (SizeOfY - Image.Height) / 2;=0D
break;=0D
+ case EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended:=0D
+ DestX =3D (SizeOfX - Image.Width) / 2;=0D
+ DestY =3D (SizeOfY * 382) / 1000 - Image.Height / 2;=0D
+ break;=0D
case EdkiiPlatformLogoDisplayAttributeCenter:=0D
DestX =3D (SizeOfX - Image.Width) / 2;=0D
DestY =3D (SizeOfY - Image.Height) / 2;=0D
diff --git a/MdeModulePkg/Logo/Logo.c b/MdeModulePkg/Logo/Logo.c
index c647253ecd..131a1b456a 100644
--- a/MdeModulePkg/Logo/Logo.c
+++ b/MdeModulePkg/Logo/Logo.c
@@ -26,7 +26,7 @@ EFI_HII_HANDLE mHiiHandle;
LOGO_ENTRY mLogos[] =3D {=0D
{=0D
IMAGE_TOKEN (IMG_LOGO),=0D
- EdkiiPlatformLogoDisplayAttributeCenter,=0D
+ EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended,=0D
0,=0D
0=0D
}=0D
--=20
2.26.2

Join devel@edk2.groups.io to automatically receive all group messages.