fix: Fix alignment of multiline vertically centered text
This commit is contained in:
parent
8303e79689
commit
c266e39c41
1 changed files with 1 additions and 1 deletions
|
@ -496,7 +496,7 @@ void Control::getTextPosition(glm::ivec2 &position, int lineCount, const glm::iv
|
|||
case TextAlign::LeftCenter2:
|
||||
case TextAlign::CenterCenter:
|
||||
default:
|
||||
position.y = _extent.top + size.y / 2;
|
||||
position.y = _extent.top + size.y / 2 - static_cast<int>(glm::max(0, (lineCount - 2)) * _text.font->height());
|
||||
break;
|
||||
}
|
||||
// Horizontal alignment
|
||||
|
|
Loading…
Reference in a new issue