mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container
This commit is contained in:
parent
5300e54295
commit
4b24cb0d4e
|
@ -89,7 +89,7 @@ void ScrollableContainer::resetComponent()
|
|||
float numLines {std::floor(mSize.y / combinedHeight)};
|
||||
if (numLines == 0)
|
||||
numLines = 1;
|
||||
mAdjustedHeight = std::round(numLines * combinedHeight);
|
||||
mAdjustedHeight = std::ceil(numLines * combinedHeight);
|
||||
}
|
||||
else {
|
||||
mAdjustedHeight = mSize.y;
|
||||
|
@ -163,7 +163,7 @@ void ScrollableContainer::update(int deltaTime)
|
|||
float numLines {std::floor(mSize.y / combinedHeight)};
|
||||
if (numLines == 0)
|
||||
numLines = 1;
|
||||
mAdjustedHeight = std::round(numLines * combinedHeight);
|
||||
mAdjustedHeight = std::ceil(numLines * combinedHeight);
|
||||
}
|
||||
else {
|
||||
mAdjustedHeight = mSize.y;
|
||||
|
|
Loading…
Reference in a new issue