Initialise the box allocation

We need the allocation to be < 0 for the subclasses to compute it
correctly the first time.
This commit is contained in:
Emmanuele Bassi 2007-08-06 19:36:39 +00:00
parent 54b77d12cd
commit a55cea7b2b

View File

@ -313,7 +313,8 @@ clutter_box_class_init (ClutterBoxClass *klass)
static void
clutter_box_init (ClutterBox *box)
{
box->allocation.x1 = box->allocation.y1 = 0;
box->allocation.x2 = box->allocation.y2 = -1;
}
/*
@ -508,7 +509,7 @@ clutter_box_get_margin (ClutterBox *box,
* Since: 0.4
*/
void
clutter_box_set_spacing (ClutterBox *box,
clutter_box_set_margin (ClutterBox *box,
const ClutterMargin *margin)
{
g_return_if_fail (CLUTTER_IS_BOX (box));