From 653a5487ba8684ba73bb224440f567424b4c31d7 Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Sun, 19 Sep 2010 10:01:06 +0000 Subject: [PATCH] panel_items : fixed vertical panel --- src/util/area.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/util/area.c b/src/util/area.c index 801e185..d68f4d7 100644 --- a/src/util/area.c +++ b/src/util/area.c @@ -135,16 +135,28 @@ void size_by_layout (Area *a, int pos, int level) Area *child = ((Area*)l->data); 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); + //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; } } -- 2.45.2