fix refresh menu save attribute error. not consider the grayout attribute.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11329 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10 2011-02-22 08:05:56 +00:00
parent d66e9f0d04
commit 1fcd34f875
1 changed files with 15 additions and 3 deletions

View File

@ -1876,7 +1876,11 @@ UiDisplayMenu (
MenuRefreshEntry->Selection = Selection; MenuRefreshEntry->Selection = Selection;
MenuRefreshEntry->CurrentColumn = MenuOption->OptCol; MenuRefreshEntry->CurrentColumn = MenuOption->OptCol;
MenuRefreshEntry->CurrentRow = MenuOption->Row; MenuRefreshEntry->CurrentRow = MenuOption->Row;
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND; if (MenuOption->GrayOut) {
MenuRefreshEntry->CurrentAttribute = FIELD_TEXT_GRAYED | FIELD_BACKGROUND;
} else {
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
}
gMenuRefreshHead = MenuRefreshEntry; gMenuRefreshHead = MenuRefreshEntry;
} else { } else {
// //
@ -1894,7 +1898,11 @@ UiDisplayMenu (
MenuRefreshEntry->Selection = Selection; MenuRefreshEntry->Selection = Selection;
MenuRefreshEntry->CurrentColumn = MenuOption->OptCol; MenuRefreshEntry->CurrentColumn = MenuOption->OptCol;
MenuRefreshEntry->CurrentRow = MenuOption->Row; MenuRefreshEntry->CurrentRow = MenuOption->Row;
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND; if (MenuOption->GrayOut) {
MenuRefreshEntry->CurrentAttribute = FIELD_TEXT_GRAYED | FIELD_BACKGROUND;
} else {
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
}
} }
} }
@ -2202,7 +2210,11 @@ UiDisplayMenu (
// //
if (gMenuRefreshHead != NULL) { if (gMenuRefreshHead != NULL) {
for (MenuRefreshEntry = gMenuRefreshHead; MenuRefreshEntry != NULL; MenuRefreshEntry = MenuRefreshEntry->Next) { for (MenuRefreshEntry = gMenuRefreshHead; MenuRefreshEntry != NULL; MenuRefreshEntry = MenuRefreshEntry->Next) {
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND; if (MenuOption->GrayOut) {
MenuRefreshEntry->CurrentAttribute = FIELD_TEXT_GRAYED | FIELD_BACKGROUND;
} else {
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
}
if (MenuRefreshEntry->MenuOption == MenuOption) { if (MenuRefreshEntry->MenuOption == MenuOption) {
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextHighlightColor) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor); MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextHighlightColor) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor);
} }