X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Futil%2Farea.c;h=62417fe30242f7b3fd278b32f472e19136b450e9;hb=d4e1cb0c2b90dcae466a0733adecd32c25a84a1c;hp=ce122a2178d5f31de655c074da6aa6f380d1d0ea;hpb=7a03bbf353324d6803aa84ca8fd41e6c6f4d099c;p=chaz%2Ftint2 diff --git a/src/util/area.c b/src/util/area.c index ce122a2..62417fe 100644 --- a/src/util/area.c +++ b/src/util/area.c @@ -68,13 +68,6 @@ * 'panel_items = SC' define a panel with just Systray and Clock. * So the tree 'Panel.Area' will have 2 childs (Systray and Clock). * - * 1) ok - * 2) ?? - * 3) ?? - * répartition entre niveau global et niveau local ?? - * size_by_content peut-il modifier redraw=1 en cas de changement ? ou est ce géré par chaque composant ? - * size_by_layout peut-il modifier redraw ? - * ************************************************************/ void rendering(void *obj) @@ -140,18 +133,31 @@ void size_by_layout (Area *a, int pos, int level) int i=0; for (l = a->list; l ; l = l->next) { Area *child = ((Area*)l->data); + if (!child->on_screen) continue; i++; - if (pos != child->posx) { - // pos changed => redraw - child->posx = pos; - child->redraw = 1; + if (panel_horizontal) { + if (pos != child->posx) { + // pos changed => redraw + child->posx = pos; + child->redraw = 1; + } + } + else { + if (pos != child->posy) { + // pos changed => redraw + child->posy = pos; + child->redraw = 1; + } } //printf("level %d, object %d, pos %d\n", level, i, pos); size_by_layout(child, pos, level+1); - pos += child->width + a->paddingx; + if (panel_horizontal) + pos += child->width + a->paddingx; + else + pos += child->height + a->paddingx; } }