From 4b24cb0d4e6a9c48e3590e52128f8690693b428e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 15 Sep 2024 11:39:04 +0200 Subject: [PATCH] Changed a rounding in ScrollableContainer to slightly decrease the risk of glyphs getting cut off at the bottom of the container --- es-core/src/components/ScrollableContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index 3b394d606..010ffca89 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -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;