mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[Escher] The TextView handles the case where its text is nullptr
Change-Id: I358b893ab64ee969f41b4f6f0df0ca6a37201de3
This commit is contained in:
@@ -36,6 +36,9 @@ void TextView::setAlignment(float horizontalAlignment, float verticalAlignment)
|
||||
}
|
||||
|
||||
void TextView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
if (m_text == nullptr) {
|
||||
return;
|
||||
}
|
||||
KDSize textSize = KDText::stringSize(m_text);
|
||||
KDPoint origin = {
|
||||
(KDCoordinate)(m_horizontalAlignment*(m_frame.width() - textSize.width())),
|
||||
|
||||
Reference in New Issue
Block a user