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
This commit is contained in:
Rob Bradford 2009-12-01 17:44:42 +00:00
parent c564303601
commit cdba8cc220

View File

@ -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;