Skip to content

Commit

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

Fixes microsoft#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 <[email protected]>
  • Loading branch information
2 people authored and apop5 committed Aug 27, 2024
1 parent 4f39de4 commit b5632fc
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 b5632fc

Please sign in to comment.