mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
One more try to fix a rounding issue in TextComponent.
This commit is contained in:
parent
681218f55a
commit
5f6bd48022
|
@ -184,7 +184,7 @@ void TextComponent::render(const glm::mat4& parentTrans)
|
|||
break;
|
||||
}
|
||||
case ALIGN_CENTER: {
|
||||
yOff = std::round(getSize().y - textSize.y) / 2.0f;
|
||||
yOff = std::round((getSize().y - textSize.y) / 2.0f);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
@ -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 = std::round(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
|
||||
|
|
Loading…
Reference in a new issue