aboutsummaryrefslogtreecommitdiff
path: root/src/saffron_widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/saffron_widget.c')
-rw-r--r--src/saffron_widget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/saffron_widget.c b/src/saffron_widget.c
index 779253b..b673e48 100644
--- a/src/saffron_widget.c
+++ b/src/saffron_widget.c
@@ -66,6 +66,10 @@ void saffron_widget_add_child(SaffronWidget *parent, SaffronWidget *child) {
parent->children = realloc(parent->children, sizeof(SaffronWidget*) * (parent->child_count + 1));
parent->children[parent->child_count] = child;
parent->child_count++;
+
+ if (parent->type == SAFFRON_WIDGET_BOX) {
+ saffron_box_layout((SaffronBox*)parent);
+ }
}
SaffronWidget* saffron_widget_hit_test(SaffronWidget* widget, int x, int y) {