mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
af047db78d
commit
ae4f5746ef
|
@ -279,7 +279,10 @@ GetWidth (
|
||||||
// For modal form, clean the entire row.
|
// For modal form, clean the entire row.
|
||||||
//
|
//
|
||||||
if ((gFormData->Attribute & HII_DISPLAY_MODAL) != 0) {
|
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;
|
Size = 0;
|
||||||
|
@ -1999,9 +2002,12 @@ UiDisplayMenu (
|
||||||
if (!ValueIsScroll (TRUE, TopOfScreen)) {
|
if (!ValueIsScroll (TRUE, TopOfScreen)) {
|
||||||
UpArrow = TRUE;
|
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) {
|
if (UpArrow) {
|
||||||
gST->ConOut->SetAttribute (gST->ConOut, GetArrowColor ());
|
gST->ConOut->SetAttribute (gST->ConOut, GetArrowColor ());
|
||||||
PrintCharAt (
|
PrintCharAt (
|
||||||
|
@ -2036,14 +2042,24 @@ UiDisplayMenu (
|
||||||
SavedMenuOption = MenuOption;
|
SavedMenuOption = MenuOption;
|
||||||
SkipHighLight = TRUE;
|
SkipHighLight = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayOneMenu (MenuOption,
|
if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
|
||||||
((FormData->Attribute & HII_DISPLAY_MODAL) != 0) ? LEFT_SKIPPED_COLUMNS + gModalSkipColumn : LEFT_SKIPPED_COLUMNS,
|
DisplayOneMenu (MenuOption,
|
||||||
gStatementDimensions.LeftColumn,
|
LEFT_SKIPPED_COLUMNS,
|
||||||
Link == TopOfScreen ? SkipValue : 0,
|
gStatementDimensions.LeftColumn + gModalSkipColumn,
|
||||||
BottomRow,
|
Link == TopOfScreen ? SkipValue : 0,
|
||||||
Link == NewPos && IsSelectable(MenuOption)
|
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.
|
// 3. Update the row info which will be used by next menu.
|
||||||
|
@ -2069,7 +2085,7 @@ UiDisplayMenu (
|
||||||
//
|
//
|
||||||
while (Row <= BottomRow) {
|
while (Row <= BottomRow) {
|
||||||
if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
|
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 {
|
} else {
|
||||||
PrintStringAtWithWidth(gStatementDimensions.LeftColumn, Row++, L"", gStatementDimensions.RightColumn - gHelpBlockWidth - gStatementDimensions.LeftColumn);
|
PrintStringAtWithWidth(gStatementDimensions.LeftColumn, Row++, L"", gStatementDimensions.RightColumn - gHelpBlockWidth - gStatementDimensions.LeftColumn);
|
||||||
}
|
}
|
||||||
|
@ -2078,8 +2094,11 @@ UiDisplayMenu (
|
||||||
//
|
//
|
||||||
// 4. Print the down arrow row.
|
// 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) {
|
if (DownArrow) {
|
||||||
gST->ConOut->SetAttribute (gST->ConOut, GetArrowColor ());
|
gST->ConOut->SetAttribute (gST->ConOut, GetArrowColor ());
|
||||||
PrintCharAt (
|
PrintCharAt (
|
||||||
|
|
Loading…
Reference in New Issue