UWP: Fix missing font file causing missing text fields. Fixes #15771

This commit is contained in:
Henrik Rydgård committed 2022-08-04 10:44:12 +02:00
1 parent c3324c872f
commit e7e1bb6079
3 files changed
+20 -8

No files matched your search

+1 -1
View File
@@ -1046,7 +1046,7 @@ void TextEdit::Draw(UIContext &dc) {
}
void TextEdit::GetContentDimensions(const UIContext &dc, float &w, float &h) const {
dc.MeasureText(dc.theme->uiFont, 1.0f, 1.0f, text_.size() ? text_.c_str() : "Wj", &w, &h, align_);
dc.MeasureText(dc.theme->uiFont, 1.0f, 1.0f, !text_.empty() ? text_.c_str() : "Wj", &w, &h, align_);
w += 2;
h += 2;
}