OpenCanopy: Fix regression from last commit

Non-overflowing picker may be left-aligned instead of centered.
This commit is contained in:
Marvin Häuser 2021-03-07 21:51:33 +01:00
parent 446ce70f12
commit 52d30eef56

View File

@ -1721,17 +1721,17 @@ BootPickerViewLateInitialize (
while (!IsNull (&mBootPicker.Hdr.Obj.Children, ListEntry)) {
BootEntry = BASE_CR (ListEntry, GUI_VOLUME_ENTRY, Hdr.Link);
if (mBootPicker.Hdr.Obj.OffsetX + BootEntry->Hdr.Obj.OffsetX < 0) {
//
// Move the first fully visible boot entry to the very left to prevent
// cut-off entries. This only applies when entries overflow.
//
ScrollOffset = -(INT64) FirstPosOffset;
break;
}
FirstPosOffset = mBootPicker.Hdr.Obj.OffsetX + BootEntry->Hdr.Obj.OffsetX;
ListEntry = ListEntry->BackLink;
}
//
// Move the first fully visible boot entry to the very left to prevent
// cut-off entries.
//
ScrollOffset = -(INT64) FirstPosOffset;
}
mBootPicker.Hdr.Obj.OffsetX += ScrollOffset;