mirror of
https://github.com/Dasharo/edk2.git
synced 2026-06-13 10:16:24 -07:00
CustomizedDisplayLib: Set Colors.h defs to PCDs and only use the defs later
Signed-off-by: Filip Gołaś <philipgoclever@gmail.com>
This commit is contained in:
@@ -249,18 +249,6 @@ GetPopupColor (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific title attribute colors.
|
||||
|
||||
@retval Byte code color setting for title bar color.
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
GetTitleColor (
|
||||
VOID
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific popup attribute colors.
|
||||
|
||||
@@ -360,28 +348,6 @@ GetSubTitleTextColor (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific banner color attribute.
|
||||
|
||||
@retval Byte code color setting for banner text color.
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
GetBannerColor (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific key help text color attribute.
|
||||
|
||||
@retval Byte code color setting for key help text color.
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
GetKeyHelpColor (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Count the storage space of a Unicode string.
|
||||
|
||||
|
||||
@@ -14,25 +14,30 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
//
|
||||
// Screen Color Settings
|
||||
//
|
||||
#define PICKLIST_HIGHLIGHT_TEXT EFI_WHITE
|
||||
#define PICKLIST_HIGHLIGHT_BACKGROUND EFI_BACKGROUND_CYAN
|
||||
#define TITLE_TEXT EFI_WHITE
|
||||
#define TITLE_BACKGROUND EFI_BACKGROUND_BLUE
|
||||
#define KEYHELP_TEXT EFI_LIGHTGRAY
|
||||
#define KEYHELP_BACKGROUND EFI_BACKGROUND_BLACK
|
||||
#define SUBTITLE_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
|
||||
#define BANNER_TEXT EFI_BLUE
|
||||
#define BANNER_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
|
||||
#define FIELD_TEXT_GRAYED EFI_DARKGRAY
|
||||
#define FIELD_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
|
||||
#define POPUP_TEXT EFI_LIGHTGRAY
|
||||
#define POPUP_BACKGROUND EFI_BACKGROUND_BLUE
|
||||
#define POPUP_INVERSE_TEXT EFI_LIGHTGRAY
|
||||
#define POPUP_INVERSE_BACKGROUND EFI_BACKGROUND_BLACK
|
||||
#define HELP_TEXT EFI_BLUE
|
||||
#define ERROR_TEXT EFI_RED | EFI_BRIGHT
|
||||
#define INFO_TEXT EFI_YELLOW | EFI_BRIGHT
|
||||
#define ARROW_TEXT EFI_RED | EFI_BRIGHT
|
||||
#define ARROW_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
|
||||
#define PICKLIST_HIGHLIGHT_TEXT PcdGet8 (PcdBrowserPickListTextColor)
|
||||
#define PICKLIST_HIGHLIGHT_BACKGROUND PcdGet8 (PcdBrowserPickListBackgroundColor)
|
||||
#define TITLE_TEXT PcdGet8 (PcdBrowserTitleTextColor)
|
||||
#define TITLE_BACKGROUND PcdGet8 (PcdBrowserTitleBackgroundColor)
|
||||
#define KEYHELP_TEXT PcdGet8 (PcdBrowserKeyHelpTextColor)
|
||||
#define KEYHELP_BACKGROUND PcdGet8 (PcdBrowserKeyHelpBackgroundColor)
|
||||
#define SUBTITLE_TEXT PcdGet8 (PcdBrowserSubtitleTextColor)
|
||||
#define BANNER_TEXT PcdGet8 (PcdBrowserBannerTextColor)
|
||||
#define BANNER_BACKGROUND PcdGet8 (PcdBrowserBannerBackgroundColor)
|
||||
#define FIELD_TEXT PcdGet8 (PcdBrowserFieldTextColor)
|
||||
#define FIELD_TEXT_GRAYED PcdGet8 (PcdBrowserFieldGrayedTextColor)
|
||||
#define FIELD_BACKGROUND PcdGet8 (PcdBrowserFieldBackgroundColor)
|
||||
#define FIELD_TEXT_HIGHLIGHT PcdGet8 (PcdBrowserFieldTextHighlightColor)
|
||||
#define FIELD_BACKGROUND_HIGHLIGHT PcdGet8 (PcdBrowserFieldBackgroundHighlightColor)
|
||||
#define POPUP_TEXT PcdGet8 (PcdBrowserPopupTextColor)
|
||||
#define POPUP_BACKGROUND PcdGet8 (PcdBrowserPopupBackgroundColor)
|
||||
#define POPUP_INVERSE_TEXT PcdGet8 (PcdBrowserPopupInverseTextColor)
|
||||
#define POPUP_INVERSE_BACKGROUND PcdGet8 (PcdBrowserPopupInverseBackgroundColor)
|
||||
#define HELP_TEXT PcdGet8 (PcdBrowserHelpTextColor)
|
||||
#define HELP_BACKGROUND PcdGet8 (PcdBrowserHelpBackgroundColor)
|
||||
#define ERROR_TEXT PcdGet8 (PcdBrowserErrorTextColor)
|
||||
#define INFO_TEXT PcdGet8 (PcdBrowserInfoTextColor)
|
||||
#define INFO_BACKGROUND PcdGet8 (PcdBrowserInfoBackgroundColor)
|
||||
#define ARROW_TEXT PcdGet8 (PcdBrowserArrowTextColor)
|
||||
#define ARROW_BACKGROUND PcdGet8 (PcdBrowserArrowBackgroundColor)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -153,7 +153,7 @@ RefreshKeyHelp (
|
||||
return;
|
||||
}
|
||||
|
||||
gST->ConOut->SetAttribute (gST->ConOut, GetKeyHelpColor());
|
||||
gST->ConOut->SetAttribute (gST->ConOut, KEYHELP_TEXT | KEYHELP_BACKGROUND);
|
||||
|
||||
if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
|
||||
return;
|
||||
@@ -798,21 +798,7 @@ GetPopupColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserPopupTextColor) | PcdGet8 (PcdBrowserPopupBackgroundColor);
|
||||
}
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific title colors.
|
||||
|
||||
@retval Byte code color setting for popup color.
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
GetTitleColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserTitleTextColor) | PcdGet8 (PcdBrowserTitleBackgroundColor);
|
||||
return POPUP_TEXT | POPUP_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -826,7 +812,7 @@ GetPopupInverseColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserPopupInverseTextColor) | PcdGet8 (PcdBrowserPopupInverseBackgroundColor);
|
||||
return POPUP_INVERSE_TEXT | POPUP_INVERSE_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -840,8 +826,9 @@ GetPickListColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserPickListTextColor) | PcdGet8 (PcdBrowserPickListBackgroundColor);
|
||||
return PICKLIST_HIGHLIGHT_TEXT | PICKLIST_HIGHLIGHT_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific arrow color attribute.
|
||||
|
||||
@@ -853,7 +840,7 @@ GetArrowColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserArrowTextColor) | PcdGet8 (PcdBrowserArrowBackgroundColor);
|
||||
return ARROW_TEXT | ARROW_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -867,7 +854,7 @@ GetInfoTextColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserInfoTextColor) | PcdGet8 (PcdBrowserInfoBackgroundColor);
|
||||
return INFO_TEXT | INFO_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -881,7 +868,7 @@ GetHelpTextColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserHelpTextColor) | PcdGet8 (PcdBrowserHelpBackgroundColor);
|
||||
return HELP_TEXT | HELP_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -895,7 +882,7 @@ GetGrayedTextColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserFieldGrayedTestColor) | PcdGet8 (PcdBrowserFieldBackgroundColor);
|
||||
return FIELD_TEXT_GRAYED | FIELD_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -909,7 +896,7 @@ GetHighlightTextColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserFieldTextHighlightColor) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor);
|
||||
return FIELD_TEXT_HIGHLIGHT | FIELD_BACKGROUND_HIGHLIGHT;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -923,7 +910,7 @@ GetFieldTextColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserFieldTextColor) | PcdGet8 (PcdBrowserFieldBackgroundColor);
|
||||
return FIELD_TEXT | FIELD_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -937,35 +924,7 @@ GetSubTitleTextColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserSubtitleTextColor) | PcdGet8 (PcdBrowserFieldBackgroundColor);
|
||||
}
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific banner text color attribute.
|
||||
|
||||
@retval Byte code color setting for banner text color.
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
GetBannerColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserBannerTextColor) | PcdGet8 (PcdBrowserBannerBackgroundColor);
|
||||
}
|
||||
|
||||
/**
|
||||
Get OEM/Vendor specific key help text color attribute.
|
||||
|
||||
@retval Byte code color setting for key help text color.
|
||||
**/
|
||||
UINT8
|
||||
EFIAPI
|
||||
GetKeyHelpColor (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
return PcdGet8 (PcdBrowserKeyHelpTextColor) | PcdGet8 (PcdBrowserKeyHelpBackgroundColor);
|
||||
return SUBTITLE_TEXT | FIELD_BACKGROUND;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ PrintBannerInfo (
|
||||
gScreenDimensions.RightColumn,
|
||||
gScreenDimensions.TopRow,
|
||||
FRONT_PAGE_HEADER_HEIGHT - 1 + gScreenDimensions.TopRow,
|
||||
GetBannerColor()
|
||||
BANNER_TEXT | BANNER_BACKGROUND
|
||||
);
|
||||
|
||||
//
|
||||
@@ -151,7 +151,7 @@ PrintFramework (
|
||||
gScreenDimensions.RightColumn,
|
||||
gScreenDimensions.BottomRow - STATUS_BAR_HEIGHT - gFooterHeight,
|
||||
gScreenDimensions.BottomRow - STATUS_BAR_HEIGHT - 1,
|
||||
GetKeyHelpColor()
|
||||
KEYHELP_TEXT | KEYHELP_BACKGROUND
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ PrintFramework (
|
||||
// ? ?
|
||||
// +------------------------------------------------------------------------------+
|
||||
//
|
||||
gST->ConOut->SetAttribute (gST->ConOut, GetTitleColor());
|
||||
gST->ConOut->SetAttribute (gST->ConOut, TITLE_TEXT | TITLE_BACKGROUND);
|
||||
Character = BOXDRAW_DOWN_RIGHT;
|
||||
|
||||
PrintCharAt (gScreenDimensions.LeftColumn, gScreenDimensions.TopRow, Character);
|
||||
|
||||
Reference in New Issue
Block a user