the min size of the box is the sum of the items min size
authorwatchwolf <watchwolf@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 9 Jul 2010 11:17:35 +0000 (11:17 +0000)
committerwatchwolf <watchwolf@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 9 Jul 2010 11:17:35 +0000 (11:17 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@50156 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_box.c

index c2fa14b..c1923cd 100644 (file)
@@ -26,6 +26,9 @@ struct _Evas_Object_Box_Accessor
 
 static const char _evas_object_box_type[] = "Evas_Object_Box";
 
+
+static void _sizing_eval(Evas_Object *obj);
+
 #define EVAS_OBJECT_BOX_DATA_GET(o, ptr)                       \
   Evas_Object_Box_Data *ptr = evas_object_smart_data_get(o)
 
@@ -139,6 +142,12 @@ _on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUS
    if (!priv->layouting) evas_object_smart_changed(box);
 }
 
+static void
+_on_hints_changed(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *o , void *einfo __UNUSED__)
+{
+   _sizing_eval(o);
+}
+
 static Evas_Object_Box_Option *
 _evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child)
 {
@@ -425,6 +434,9 @@ _evas_object_box_smart_add(Evas_Object *o)
      }
    _evas_object_box_parent_sc->add(o);
 
+
+   evas_object_event_callback_add
+     (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o);
    priv->children = NULL;
    priv->align.h = 0.5;
    priv->align.v = 0.5;