Default text in edit box was not positioned correctly with center or right alignment

0.8
Bruno Van de Velde 2017-08-18 16:08:29 +02:00
parent aafe909eee
commit d8b1d3a670
1 changed files with 1 additions and 1 deletions

View File

@ -1210,7 +1210,7 @@ namespace tgui
if (m_textAlignment != Alignment::Left)
{
// Calculate the text width
const float textWidth = m_textFull.getSize().x;
const float textWidth = m_textFull.getString().isEmpty() ? m_defaultText.getSize().x : m_textFull.getSize().x;
// Check if a layout would make sense
if (textWidth < getVisibleEditBoxWidth())