public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Patrick Rudolph" <patrick.rudolph@9elements.com>
To: devel@edk2.groups.io
Cc: tcrawford@system76.com, jian.j.wang@intel.com,
	hao.a.wu@intel.com, zhichao.gao@intel.com, ray.ni@intel.com
Subject: [PATCH - resend] MdeModulePkg/BootLogoLib: Center logo 38.2% from top of screen
Date: Wed, 17 Feb 2021 11:10:32 +0100	[thread overview]
Message-ID: <20210217101032.2822164-1-patrick.rudolph@9elements.com> (raw)

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/Include/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,
   EdkiiPlatformLogoDisplayAttributeLeftBottom,
   EdkiiPlatformLogoDisplayAttributeCenterLeft,
-  EdkiiPlatformLogoDisplayAttributeCenter
+  EdkiiPlatformLogoDisplayAttributeCenter,
+  EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended
 } EDKII_PLATFORM_LOGO_DISPLAY_ATTRIBUTE;
 
 /**
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 = 0;
       DestY = (SizeOfY - Image.Height) / 2;
       break;
+    case EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended:
+      DestX = (SizeOfX - Image.Width) / 2;
+      DestY = (SizeOfY * 382) / 1000 - Image.Height / 2;
+      break;
     case EdkiiPlatformLogoDisplayAttributeCenter:
       DestX = (SizeOfX - Image.Width) / 2;
       DestY = (SizeOfY - Image.Height) / 2;
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[] = {
   {
     IMAGE_TOKEN (IMG_LOGO),
-    EdkiiPlatformLogoDisplayAttributeCenter,
+    EdkiiPlatformLogoDisplayAttributeMicrosoftRecommended,
     0,
     0
   }
-- 
2.26.2


             reply	other threads:[~2021-02-17 10:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 10:10 Patrick Rudolph [this message]
2021-02-18  3:32 ` 回复: [edk2-devel] [PATCH - resend] MdeModulePkg/BootLogoLib: Center logo 38.2% from top of screen gaoliming
2021-02-18 12:43   ` Patrick Rudolph
2021-02-22  3:30     ` Wu, Hao A
2021-02-22  8:40       ` Ni, Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210217101032.2822164-1-patrick.rudolph@9elements.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox