From cdba8cc220a8ef026ade2dfaa542ff94c92cd5ef Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 1 Dec 2009 17:44:42 +0000 Subject: [PATCH] flow-layout: Include the first line when calculating number of lines This ensures that the preferred height / width height takes into consideration the correct amount of padding --- clutter/clutter-flow-layout.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clutter/clutter-flow-layout.c b/clutter/clutter-flow-layout.c index e6f836e57..611a46b96 100644 --- a/clutter/clutter-flow-layout.c +++ b/clutter/clutter-flow-layout.c @@ -233,6 +233,9 @@ clutter_flow_layout_get_preferred_width (ClutterLayoutManager *manager, 16); } + if (children) + line_count = 1; + for (l = children; l != NULL; l = l->next) { ClutterActor *child = l->data; @@ -379,6 +382,9 @@ clutter_flow_layout_get_preferred_height (ClutterLayoutManager *manager, 16); } + if (children) + line_count = 1; + for (l = children; l != NULL; l = l->next) { ClutterActor *child = l->data;