box: Munge the allocation passed to the layout manager
The actor is in charge of providing to the LayoutManager the available allocation. ClutterBox should not just pass the box it got from its parent: it should, instead, provide a normalized box, with an origin in (0, 0) and the available size. https://bugzilla.gnome.org/show_bug.cgi?id=649631
This commit is contained in:
@ -384,13 +384,20 @@ clutter_box_real_allocate (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv;
|
ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv;
|
||||||
ClutterActorClass *klass;
|
ClutterActorClass *klass;
|
||||||
|
ClutterActorBox box;
|
||||||
|
gfloat w, h;
|
||||||
|
|
||||||
klass = CLUTTER_ACTOR_CLASS (clutter_box_parent_class);
|
klass = CLUTTER_ACTOR_CLASS (clutter_box_parent_class);
|
||||||
klass->allocate (actor, allocation, flags);
|
klass->allocate (actor, allocation, flags);
|
||||||
|
|
||||||
|
clutter_actor_box_get_size (allocation, &w, &h);
|
||||||
|
|
||||||
|
clutter_actor_box_set_origin (&box, 0.f, 0.f);
|
||||||
|
clutter_actor_box_set_size (&box, w, h);
|
||||||
|
|
||||||
clutter_layout_manager_allocate (priv->manager,
|
clutter_layout_manager_allocate (priv->manager,
|
||||||
CLUTTER_CONTAINER (actor),
|
CLUTTER_CONTAINER (actor),
|
||||||
allocation, flags);
|
&box, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user