diff --git a/Platform/OpenCanopy/BitmapFont.c b/Platform/OpenCanopy/BitmapFont.c index 89bc999649c..a607a3e7127 100644 --- a/Platform/OpenCanopy/BitmapFont.c +++ b/Platform/OpenCanopy/BitmapFont.c @@ -14,6 +14,7 @@ #include "OpenCanopy.h" #include "BmfLib.h" +#include "GuiApp.h" CONST BMF_CHAR * BmfGetChar ( @@ -621,8 +622,8 @@ GuiGetLabel ( &Context->BmfContext, String, StringLen, - 2 * Context->Scale, - 2 * Context->Scale + BOOT_ENTRY_LABEL_TEXT_OFFSET * Context->Scale, + BOOT_ENTRY_LABEL_TEXT_OFFSET * Context->Scale ); if (TextInfo == NULL) { DEBUG ((DEBUG_WARN, "BMF: GetTextInfo failed\n")); diff --git a/Platform/OpenCanopy/GuiApp.c b/Platform/OpenCanopy/GuiApp.c index 6720d125c5d..a83074afeac 100644 --- a/Platform/OpenCanopy/GuiApp.c +++ b/Platform/OpenCanopy/GuiApp.c @@ -490,12 +490,12 @@ InternalContextConstruct ( FontDataSize, Context->Scale ); - if (Context->FontContext.BmfContext.Height != BOOT_ENTRY_LABEL_HEIGHT * Context->Scale) { + if (Context->FontContext.BmfContext.Height != (BOOT_ENTRY_LABEL_HEIGHT - BOOT_ENTRY_LABEL_TEXT_OFFSET) * Context->Scale) { DEBUG(( DEBUG_WARN, "OCUI: Font has height %d instead of %d\n", Context->FontContext.BmfContext.Height, - BOOT_ENTRY_LABEL_HEIGHT * Context->Scale + (BOOT_ENTRY_LABEL_HEIGHT - BOOT_ENTRY_LABEL_TEXT_OFFSET) * Context->Scale )); Result = FALSE; } diff --git a/Platform/OpenCanopy/GuiApp.h b/Platform/OpenCanopy/GuiApp.h index bff8779a4b0..78e20643a6b 100644 --- a/Platform/OpenCanopy/GuiApp.h +++ b/Platform/OpenCanopy/GuiApp.h @@ -17,11 +17,12 @@ #define BOOT_CURSOR_OFFSET 4U -#define BOOT_ENTRY_DIMENSION 144U -#define BOOT_ENTRY_ICON_DIMENSION APPLE_DISK_ICON_DIMENSION -#define BOOT_ENTRY_ICON_SPACE ((BOOT_ENTRY_DIMENSION - BOOT_ENTRY_ICON_DIMENSION) / 2) -#define BOOT_ENTRY_LABEL_SPACE 4U -#define BOOT_ENTRY_LABEL_HEIGHT 12U +#define BOOT_ENTRY_DIMENSION 144U +#define BOOT_ENTRY_ICON_DIMENSION APPLE_DISK_ICON_DIMENSION +#define BOOT_ENTRY_ICON_SPACE ((BOOT_ENTRY_DIMENSION - BOOT_ENTRY_ICON_DIMENSION) / 2) +#define BOOT_ENTRY_LABEL_SPACE 4U +#define BOOT_ENTRY_LABEL_HEIGHT 12U +#define BOOT_ENTRY_LABEL_TEXT_OFFSET 2U #define BOOT_ENTRY_SPACE 8U