X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Futil%2Farea.c;h=62417fe30242f7b3fd278b32f472e19136b450e9;hb=d4e1cb0c2b90dcae466a0733adecd32c25a84a1c;hp=460abd94e0f7ffc258c981f14ee2c317eefa2519;hpb=9daa525aab5dfb62788865e4cbe4d92ddf055e93;p=chaz%2Ftint2 diff --git a/src/util/area.c b/src/util/area.c index 460abd9..62417fe 100644 --- a/src/util/area.c +++ b/src/util/area.c @@ -133,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; } }