mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
fix right align
Signed-off-by: Sophia Hadash <sophiahadash@gmail.com>
This commit is contained in:
parent
c68f78f3d1
commit
1c93ca2c07
|
@ -201,9 +201,10 @@ void FlexboxComponent::computeLayout()
|
|||
if (!image.second.isVisible())
|
||||
continue;
|
||||
if (line == mLines)
|
||||
image.second.setPosition(image.second.getPosition().x +
|
||||
(maxItemSize.x + mItemMargin.x) * n,
|
||||
image.second.getPosition().y);
|
||||
image.second.setPosition(
|
||||
image.second.getPosition().x +
|
||||
floorf((maxItemSize.x + mItemMargin.x) * static_cast<float>(n)),
|
||||
image.second.getPosition().y);
|
||||
if ((i++ + 1) % std::max(1, static_cast<int>(mItemsPerLine)) == 0)
|
||||
line++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue