FormGroup::Line: add setLayout()

This commit is contained in:
Raphael Coeffic
2022-06-20 08:03:23 +02:00
parent 0255bd5f3c
commit f4916a3c4f
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -93,6 +93,12 @@ void FormGroup::Line::construct()
lv_obj_set_width(lvobj, lv_pct(100));
}
void FormGroup::Line::setLayout(FlexGridLayout *l)
{
layout = l;
if (layout) layout->apply(lvobj);
}
void FormGroup::Line::addChild(Window* window)
{
Window::addChild(window);
+2
View File
@@ -90,6 +90,8 @@ class FormGroup : public Window
Line(Window *parent, lv_obj_t *obj, FlexGridLayout *layout = nullptr);
Line(Window *parent, FlexGridLayout *layout = nullptr);
void setLayout(FlexGridLayout *l);
protected:
void addChild(Window *window) override;
};