From a2eedde8d3cb4daee74c0ca8aef768f42459681d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 10 Sep 2022 20:05:58 +0200 Subject: [PATCH] Fixed a small rounding error in TextComponent. --- es-core/src/components/TextComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index c428fbf96..6a6de9400 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -194,7 +194,7 @@ void TextComponent::render(const glm::mat4& parentTrans) } else { // If height is smaller than the font height, then always center vertically. - yOff = (getSize().y - textSize.y) / 2.0f; + yOff = std::round((getSize().y - textSize.y) / 2.0f); } // Draw the overall textbox area. If we're inside a scrollable container then this