Fix the amount of fitting elements calculation in the OverflowList

Before this in certain conditions (depending on the available
height) two items could be drawn in the same position. Bug #590278.
This commit is contained in:
Siegfried-Angel Gevatter Pujals 2009-08-02 20:06:32 +02:00
parent d7f5fd5d24
commit 0b801a0d2d

View File

@ -147,6 +147,9 @@ shell_overflow_list_allocate (ClutterActor *actor,
ClutterActor *actor = CLUTTER_ACTOR (iter->data);
ClutterActorBox child_box;
if (iter != children)
curheight += priv->spacing;
if ((curheight + priv->item_height) > avail_height)
{
overflow = TRUE;
@ -163,8 +166,6 @@ shell_overflow_list_allocate (ClutterActor *actor,
clutter_actor_allocate (actor, &child_box, flags);
curheight += priv->item_height;
if (iter != children)
curheight += priv->spacing;
}
priv->items_per_page = n_fits;