diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-08 06:01:23 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-03-08 06:01:23 +0000 |
commit | 81da6ef925f234f66ceb8af1598127260ed5d09e (patch) | |
tree | b653fc0d08bf139a27e027dca77a860ca9715bd3 /MdeModulePkg | |
parent | 27f3015903bf30b9ca0e72c0174e9ef787d79659 (diff) | |
download | edk2-81da6ef925f234f66ceb8af1598127260ed5d09e.tar.gz edk2-81da6ef925f234f66ceb8af1598127260ed5d09e.tar.bz2 edk2-81da6ef925f234f66ceb8af1598127260ed5d09e.zip |
Bug description:
When the menu is refresh type, and the old string is longer than new string, after refresh, some old string will still show.
The mainly change is:
1. This change cleans the old string first and then paints the new string.
2. Fixed old code checks grayout flag not correct.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11354 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c index 189b6e1dc9..553c2546b2 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c @@ -342,6 +342,7 @@ RefreshForm ( FORM_BROWSER_STATEMENT *Question;
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
EFI_BROWSER_ACTION_REQUEST ActionRequest;
+ CHAR16 *PadString;
if (gMenuRefreshHead != NULL) {
@@ -373,6 +374,11 @@ RefreshForm ( for (Index = 0; OptionString[Index] == L' '; Index++)
;
+ PadString = AllocatePool (gOptionBlockWidth * sizeof (CHAR16));
+ SetMem16 (PadString, (gOptionBlockWidth - 1) * sizeof (CHAR16), CHAR_SPACE);
+ PadString[gOptionBlockWidth - 1] = 0;
+ PrintStringAt (MenuRefreshEntry->CurrentColumn, MenuRefreshEntry->CurrentRow, PadString);
+ FreePool (PadString);
PrintStringAt (MenuRefreshEntry->CurrentColumn, MenuRefreshEntry->CurrentRow, &OptionString[Index]);
FreePool (OptionString);
}
@@ -2209,7 +2215,7 @@ UiDisplayMenu ( //
if (gMenuRefreshHead != NULL) {
for (MenuRefreshEntry = gMenuRefreshHead; MenuRefreshEntry != NULL; MenuRefreshEntry = MenuRefreshEntry->Next) {
- if (MenuOption->GrayOut) {
+ if (MenuRefreshEntry->MenuOption->GrayOut) {
MenuRefreshEntry->CurrentAttribute = FIELD_TEXT_GRAYED | FIELD_BACKGROUND;
} else {
MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
|