gui: Update elements in reverse order
This allows to calculate dimensions for containers with children containers in it.
This commit is contained in:
parent
1ea5a4d4a4
commit
96dbdea21e
|
@ -79,10 +79,10 @@ void gui_add_child(struct gui_common *const p,
|
||||||
int gui_update(struct gui_common *const g, const union peripheral *const p,
|
int gui_update(struct gui_common *const g, const union peripheral *const p,
|
||||||
const struct camera *const c)
|
const struct camera *const c)
|
||||||
{
|
{
|
||||||
if (g->cb && g->cb->update && g->cb->update(g, p, c))
|
if (g->child && gui_update(g->child, p, c))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (g->child && gui_update(g->child, p, c))
|
if (g->cb && g->cb->update && g->cb->update(g, p, c))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (struct gui_common *s = g->sibling; s; s = s->sibling)
|
for (struct gui_common *s = g->sibling; s; s = s->sibling)
|
||||||
|
|
Loading…
Reference in New Issue