aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render/BorderRenderObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/render/BorderRenderObject.cpp')
-rw-r--r--src/ui/render/BorderRenderObject.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/render/BorderRenderObject.cpp b/src/ui/render/BorderRenderObject.cpp
index 8e93e205..1392af1e 100644
--- a/src/ui/render/BorderRenderObject.cpp
+++ b/src/ui/render/BorderRenderObject.cpp
@@ -6,6 +6,7 @@
#include "cru/platform/graphics/Geometry.h"
#include "cru/platform/graphics/Painter.h"
#include "cru/ui/DebugFlags.h"
+#include "cru/ui/render/RenderObject.h"
#include <algorithm>
@@ -122,6 +123,13 @@ Size BorderRenderObject::OnMeasureContent(const MeasureRequirement& requirement,
}
}
+Size BorderRenderObject::OnMeasureContent1(const BoxConstraint& constraint) {
+ auto child = GetChild();
+ if (child == nullptr) return constraint.min;
+ auto child_size = child->Measure1(BoxConstraint::kNotLimit);
+ return constraint.Coerce(child_size);
+}
+
void BorderRenderObject::OnLayoutContent(const Rect& content_rect) {
if (auto child = GetChild()) {
child->Layout(content_rect.GetLeftTop());