From c5d7c1638490abbbb8a8c4f7613f3a45fc17ff96 Mon Sep 17 00:00:00 2001 From: Juan Carlos Lorenzo Date: Thu, 15 Aug 2024 17:08:13 -0700 Subject: [PATCH] MsGraphicsPkg: Correct positioning of trash can icon in list box - 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 checkbox thus ensuring its related operations work correctly. 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) ); }