mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
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:
parent
96810e1d4d
commit
3314385119
@ -384,13 +384,20 @@ clutter_box_real_allocate (ClutterActor *actor,
|
||||
{
|
||||
ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv;
|
||||
ClutterActorClass *klass;
|
||||
ClutterActorBox box;
|
||||
gfloat w, h;
|
||||
|
||||
klass = CLUTTER_ACTOR_CLASS (clutter_box_parent_class);
|
||||
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_CONTAINER (actor),
|
||||
allocation, flags);
|
||||
&box, flags);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user