Commit aa8c8127 authored by Emmanuele Bassi's avatar Emmanuele Bassi

box: Do not short-circuit size negotiation for empty Boxes

The LayoutManager used might decide to have a default allocation or a
default preferred size when empty.
parent 523bab08
......@@ -308,20 +308,6 @@ clutter_box_real_get_preferred_width (ClutterActor *actor,
{
ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv;
/* if we don't have any children don't bother proxying the
* call to the layout manager instance
*/
if (priv->children == NULL || priv->manager == NULL)
{
if (min_width)
*min_width = 0.0;
if (natural_width)
*natural_width = 0.0;
return;
}
clutter_layout_manager_get_preferred_width (priv->manager,
CLUTTER_CONTAINER (actor),
for_height,
......@@ -336,20 +322,6 @@ clutter_box_real_get_preferred_height (ClutterActor *actor,
{
ClutterBoxPrivate *priv = CLUTTER_BOX (actor)->priv;
/* if we don't have any children don't bother proxying the
* call to the layout manager instance
*/
if (priv->children == NULL || priv->manager == NULL)
{
if (min_height)
*min_height = 0.0;
if (natural_height)
*natural_height = 0.0;
return;
}
clutter_layout_manager_get_preferred_height (priv->manager,
CLUTTER_CONTAINER (actor),
for_width,
......@@ -367,9 +339,6 @@ clutter_box_real_allocate (ClutterActor *actor,
klass = CLUTTER_ACTOR_CLASS (clutter_box_parent_class);
klass->allocate (actor, allocation, flags);
if (priv->children == NULL || priv->manager == NULL)
return;
clutter_layout_manager_allocate (priv->manager,
CLUTTER_CONTAINER (actor),
allocation, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment