From b5632fcaf9b9d61480d78bdbdd98c8c1d5801640 Mon Sep 17 00:00:00 2001 From: julorenz117 <60625130+julorenz117@users.noreply.github.com> Date: Wed, 21 Aug 2024 19:09:53 -0700 Subject: [PATCH] [Cherry-Pick] MsGraphicsPkg: Correct positioning of trash can icon in Load Option's list box (#552) Fixes #554 - Adjusted CellTrashcanBounds.Left to be CellBounds->Right - TrashcanHitAreaWidth to ensure the trash can icon is displayed to the right of the list box. - Updated width parameter in SWM_RECT_INIT2 to use TrashcanHitAreaWidth instead of CheckBoxHitAreaWidth for correct dimensions. This resolves the issue of the trash can icon overlapping with the ListBox's deletable item's checkbox thus ensuring its related operations work correctly: activating/deactivating the Load Option or deleting it. Verified that a Load Option allowed to be deleted, such as 'Windows Boot Manager', can now be deleted by pressing the trash icon in its proper position or activated via its check-box. N/A Co-authored-by: Michael Kubacki --- MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c b/MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c index fcc42d1a73..2468a7f142 100644 --- a/MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c +++ b/MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c @@ -982,9 +982,9 @@ Ctor ( SWM_RECT_INIT2 ( this->m_pCells[Index].CellTrashcanBounds, - CellBounds->Left, + CellBounds->Right - TrashcanHitAreaWidth, CellBounds->Top, - CheckBoxHitAreaWidth, + TrashcanHitAreaWidth, SWM_RECT_HEIGHT (*CellBounds) ); }