Update window title label size to show the entire text when it's changed

This commit is contained in:
David Capello 2017-10-26 21:59:19 -03:00
parent 86a6462d7b
commit 7becbc09b8
1 changed files with 5 additions and 1 deletions

View File

@ -555,8 +555,12 @@ void Window::onBuildTitleLabel()
m_titleLabel = new WindowTitleLabel(text());
addChild(m_titleLabel);
}
else
else {
m_titleLabel->setText(text());
m_titleLabel->setBounds(
gfx::Rect(m_titleLabel->bounds()).setSize(
m_titleLabel->sizeHint()));
}
}
}