Skip to content

Commit

Permalink
MsGraphicsPkg: Correct positioning of trash can icon in Load Option's…
Browse files Browse the repository at this point in the history
… list box (#552)

## Description

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.

## How This Was Tested

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.

## Integration Instructions

N/A

Co-authored-by: Michael Kubacki <[email protected]>
  • Loading branch information
julorenz117 and makubacki authored Aug 22, 2024
1 parent bc5f1f0 commit fa263f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MsGraphicsPkg/Library/SimpleUIToolKit/ListBox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down

0 comments on commit fa263f1

Please sign in to comment.