BMenu: fix menu items width in column layout
Change-Id: Ia16d51ff31760fef28bcceeab7b5c26a05cfbdad Reviewed-on: https://review.haiku-os.org/c/haiku/+/4092 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Axel Dörfler <axeld@pinc-software.de> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
65f4a22735
commit
1aca853fc9
@ -2604,14 +2604,14 @@ BMenu::_ComputeColumnLayout(int32 index, bool bestFit, bool moveItems,
|
||||
if (fMaxContentWidth > 0)
|
||||
frame.right = std::min(frame.right, fMaxContentWidth);
|
||||
|
||||
frame.top = 0;
|
||||
frame.right = ceilf(frame.right);
|
||||
|
||||
// Finally update the "right" coordinate of all items
|
||||
if (moveItems) {
|
||||
for (int32 i = 0; i < fItems.CountItems(); i++)
|
||||
ItemAt(i)->fBounds.right = frame.right;
|
||||
}
|
||||
|
||||
frame.top = 0;
|
||||
frame.right = ceilf(frame.right);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user