From ccc3cae46b721d6c4c77b1f1e38256f80d786532 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 18 Oct 2021 19:15:50 +0200 Subject: [PATCH] Fixed some small rounding issues in TextListComponent.h --- es-core/src/components/TextListComponent.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index 1c60e8ddd..c551ec9b8 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -223,8 +223,10 @@ template void TextListComponent::render(const glm::mat4& parentT dim.y = (trans[1].y * dim.y + trans[3].y) - trans[3].y; Renderer::pushClipRect( - glm::ivec2{static_cast(trans[3].x + mHorizontalMargin), static_cast(trans[3].y)}, - glm::ivec2{static_cast(dim.x - mHorizontalMargin * 2.0f), static_cast(dim.y)}); + glm::ivec2{static_cast(std::round(trans[3].x + mHorizontalMargin)), + static_cast(std::round(trans[3].y))}, + glm::ivec2{static_cast(std::round(dim.x - mHorizontalMargin * 2.0f)), + static_cast(std::round(dim.y))}); for (int i = startEntry; i < listCutoff; i++) { typename IList::Entry& entry = mEntries.at(static_cast(i));