aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/FlexLayout.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-10 15:03:54 +0800
committercrupest <crupest@outlook.com>2020-11-10 15:03:54 +0800
commit460a45df8be4613053c6a097d9c699c70dbe1a2c (patch)
treedbd4141b27eb0cea9481fcd735a247e64b335f33 /src/ui/controls/FlexLayout.cpp
parent141fbebbe604eac53d12e7de11f999044e286cb6 (diff)
downloadcru-460a45df8be4613053c6a097d9c699c70dbe1a2c.tar.gz
cru-460a45df8be4613053c6a097d9c699c70dbe1a2c.tar.bz2
cru-460a45df8be4613053c6a097d9c699c70dbe1a2c.zip
...
Diffstat (limited to 'src/ui/controls/FlexLayout.cpp')
-rw-r--r--src/ui/controls/FlexLayout.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/ui/controls/FlexLayout.cpp b/src/ui/controls/FlexLayout.cpp
index 05f6999f..e390241f 100644
--- a/src/ui/controls/FlexLayout.cpp
+++ b/src/ui/controls/FlexLayout.cpp
@@ -8,6 +8,7 @@ using render::FlexLayoutRenderObject;
FlexLayout::FlexLayout() {
render_object_.reset(new FlexLayoutRenderObject());
render_object_->SetAttachedControl(this);
+ SetContainerRenderObject(render_object_.get());
}
FlexLayout::~FlexLayout() = default;
@@ -68,14 +69,4 @@ void FlexLayout::SetItemCrossAlign(FlexCrossAlignment alignment) {
if (alignment == GetItemCrossAlign()) return;
render_object_->SetItemCrossAlign(alignment);
}
-
-void FlexLayout::OnAddChild(Control* child, const Index position) {
- render_object_->AddChild(child->GetRenderObject(), position);
-}
-
-void FlexLayout::OnRemoveChild(Control* child, const Index position) {
- CRU_UNUSED(child)
-
- render_object_->RemoveChild(position);
-}
} // namespace cru::ui::controls