summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Ui.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Ui.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
index baf36a213b..93399c4028 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
@@ -577,6 +577,7 @@ UiWaitForSingleEvent (
@param String String description for this option.
@param Handle Hii handle for the package list.
+ @param Form The form this statement belong to.
@param Statement Statement of this Menu Option.
@param NumberOfLines Display lines for this Menu Option.
@param MenuItemCount The index for this Option in the Menu.
@@ -588,6 +589,7 @@ UI_MENU_OPTION *
UiAddMenuOption (
IN CHAR16 *String,
IN EFI_HII_HANDLE Handle,
+ IN FORM_BROWSER_FORM *Form,
IN FORM_BROWSER_STATEMENT *Statement,
IN UINT16 NumberOfLines,
IN UINT16 MenuItemCount
@@ -643,6 +645,13 @@ UiAddMenuOption (
MenuOption->GrayOut = Statement->GrayOutExpression->Result.Value.b;
}
+ //
+ // If the form or the question has the lock attribute, deal same as grayout.
+ //
+ if (Form->Locked || Statement->Locked) {
+ MenuOption->GrayOut = TRUE;
+ }
+
switch (Statement->Operand) {
case EFI_IFR_ORDERED_LIST_OP:
case EFI_IFR_ONE_OF_OP: