diff options
author | Eric Dong <eric.dong@intel.com> | 2013-09-28 04:51:32 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-09-28 04:51:32 +0000 |
commit | ae4f5746efc0dde9bb64b537f3a41e66c8729f4d (patch) | |
tree | 837e5d05eef3991cfd17866e2c396bdf6d59da1e | |
parent | af047db78d297ca33dd74e5e749166bb17a4cc4e (diff) | |
download | edk2-platforms-ae4f5746efc0dde9bb64b537f3a41e66c8729f4d.tar.xz |
Fix modal form display error.
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14736 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 8e5b890bf3..2407c7ea6a 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -279,7 +279,10 @@ GetWidth ( // For modal form, clean the entire row.
//
if ((gFormData->Attribute & HII_DISPLAY_MODAL) != 0) {
- return (UINT16)(gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - gModalSkipColumn - SCROLL_ARROW_HEIGHT);
+ if (AdjustWidth != NULL) {
+ *AdjustWidth = LEFT_SKIPPED_COLUMNS;
+ }
+ return (UINT16)(gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * (gModalSkipColumn + LEFT_SKIPPED_COLUMNS));
}
Size = 0;
@@ -1999,9 +2002,12 @@ UiDisplayMenu ( if (!ValueIsScroll (TRUE, TopOfScreen)) {
UpArrow = TRUE;
}
-
- PrintStringAtWithWidth(gStatementDimensions.LeftColumn, TopRow - 1, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
+ if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
+ PrintStringAtWithWidth(gStatementDimensions.LeftColumn + gModalSkipColumn, TopRow - 1, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * gModalSkipColumn);
+ } else {
+ PrintStringAtWithWidth(gStatementDimensions.LeftColumn, TopRow - 1, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
+ }
if (UpArrow) {
gST->ConOut->SetAttribute (gST->ConOut, GetArrowColor ());
PrintCharAt (
@@ -2036,14 +2042,24 @@ UiDisplayMenu ( SavedMenuOption = MenuOption;
SkipHighLight = TRUE;
}
-
- DisplayOneMenu (MenuOption,
- ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) ? LEFT_SKIPPED_COLUMNS + gModalSkipColumn : LEFT_SKIPPED_COLUMNS,
- gStatementDimensions.LeftColumn,
- Link == TopOfScreen ? SkipValue : 0,
- BottomRow,
- Link == NewPos && IsSelectable(MenuOption)
- );
+
+ if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
+ DisplayOneMenu (MenuOption,
+ LEFT_SKIPPED_COLUMNS,
+ gStatementDimensions.LeftColumn + gModalSkipColumn,
+ Link == TopOfScreen ? SkipValue : 0,
+ BottomRow,
+ Link == NewPos && IsSelectable(MenuOption)
+ );
+ } else {
+ DisplayOneMenu (MenuOption,
+ LEFT_SKIPPED_COLUMNS,
+ gStatementDimensions.LeftColumn,
+ Link == TopOfScreen ? SkipValue : 0,
+ BottomRow,
+ Link == NewPos && IsSelectable(MenuOption)
+ );
+ }
//
// 3. Update the row info which will be used by next menu.
@@ -2069,7 +2085,7 @@ UiDisplayMenu ( //
while (Row <= BottomRow) {
if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
- PrintStringAtWithWidth(gStatementDimensions.LeftColumn, Row++, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
+ PrintStringAtWithWidth(gStatementDimensions.LeftColumn + gModalSkipColumn, Row++, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * gModalSkipColumn);
} else {
PrintStringAtWithWidth(gStatementDimensions.LeftColumn, Row++, L"", gStatementDimensions.RightColumn - gHelpBlockWidth - gStatementDimensions.LeftColumn);
}
@@ -2078,8 +2094,11 @@ UiDisplayMenu ( //
// 4. Print the down arrow row.
//
- PrintStringAtWithWidth(gStatementDimensions.LeftColumn, BottomRow + 1, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
-
+ if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
+ PrintStringAtWithWidth(gStatementDimensions.LeftColumn + gModalSkipColumn, BottomRow + 1, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * + gModalSkipColumn);
+ } else {
+ PrintStringAtWithWidth(gStatementDimensions.LeftColumn, BottomRow + 1, L"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
+ }
if (DownArrow) {
gST->ConOut->SetAttribute (gST->ConOut, GetArrowColor ());
PrintCharAt (
|