aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/TextRenderObject.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-28 21:47:53 +0800
committercrupest <crupest@outlook.com>2020-06-28 21:47:53 +0800
commit26da84f59396075118ee769654471159e1f49980 (patch)
tree1f30fa3a167ea8de92bd22b907c82971515b0ab1 /src/ui/render/TextRenderObject.cpp
parentb3c0c076e5a1b1e7d76fa8d32af0bcbb2c1cd4cf (diff)
downloadcru-26da84f59396075118ee769654471159e1f49980.tar.gz
cru-26da84f59396075118ee769654471159e1f49980.tar.bz2
cru-26da84f59396075118ee769654471159e1f49980.zip
...
Diffstat (limited to 'src/ui/render/TextRenderObject.cpp')
-rw-r--r--src/ui/render/TextRenderObject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/render/TextRenderObject.cpp b/src/ui/render/TextRenderObject.cpp
index 9cae65d6..e0c68683 100644
--- a/src/ui/render/TextRenderObject.cpp
+++ b/src/ui/render/TextRenderObject.cpp
@@ -189,11 +189,11 @@ Size TextRenderObject::OnMeasureContent(const MeasureRequirement& requirement,
log::Warn(
"TextRenderObject: Text actual height exceeds the required max "
"height.");
- result.width = requirement.max.width.GetLengthOrUndefined();
+ result.height = requirement.max.height.GetLengthOrUndefined();
} else {
result.height =
std::max(result.height, preferred_size.height.GetLengthOr0());
- result.width =
+ result.height =
std::max(result.height, requirement.min.height.GetLengthOr0());
}