From 3e334165170f1ac6fb9c2bd153a4d667c1f656b5 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Mon, 11 Apr 2016 18:02:03 +0200
Subject: [PATCH] fix container size allocation
---
common/utils/T/tracer/gui/container.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/common/utils/T/tracer/gui/container.c b/common/utils/T/tracer/gui/container.c
index 23f7a42295..bc14a6d0e4 100644
--- a/common/utils/T/tracer/gui/container.c
+++ b/common/utils/T/tracer/gui/container.c
@@ -3,6 +3,8 @@
#include <stdio.h>
#include <stdlib.h>
+#define MAX(a, b) ((a)>(b)?(a):(b))
+
static void repack(gui *g, widget *_this)
{
printf("REPACK container %p\n", _this);
@@ -84,7 +86,7 @@ hints_ok:
l->item->hints(g, l->item, &cwidth, &cheight);
l->item->allocate(g, l->item, this->common.x, this->common.y + cy,
//this->hint_width, cheight);
- width, cheight);
+ MAX(width, cwidth), cheight);
cy += cheight;
l = l->next;
}
@@ -118,7 +120,7 @@ hints_ok:
while (l) {
l->item->hints(g, l->item, &cwidth, &cheight);
l->item->allocate(g, l->item, this->common.x + cx, this->common.y,
- cwidth, this->hint_height);
+ cwidth, MAX(height, cheight)/* this->hint_height */);
cx += cwidth;
l = l->next;
}
--
GitLab