[Elm] Helper on resize_object_add()

SVN revision: 70712
This commit is contained in:
Gustavo Lima Chaves 2012-05-03 22:41:47 +00:00
parent 4a38e1fa15
commit 57b7d52466
2 changed files with 13 additions and 3 deletions

View File

@ -1179,13 +1179,14 @@ _elm_layout_smart_add(Evas_Object *obj)
{
EVAS_SMART_DATA_ALLOC(obj, Elm_Layout_Smart_Data);
/* has to be there *before* parent's smart_add() */
ELM_WIDGET_DATA(priv)->resize_obj =
edje_object_add(evas_object_evas_get(obj));
ELM_WIDGET_CLASS(_elm_layout_parent_sc)->base.add(obj);
elm_widget_can_focus_set(obj, EINA_FALSE);
priv->base.resize_obj = edje_object_add(evas_object_evas_get(obj));
elm_widget_resize_object_set(obj, priv->base.resize_obj);
edje_object_signal_callback_add
(ELM_WIDGET_DATA(priv)->resize_obj, "size,eval", "elm",
_on_size_evaluate_signal, obj);

View File

@ -4295,6 +4295,15 @@ _smart_add(Evas_Object *obj)
* settings */
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_mirrored_set(obj, elm_config_mirrored_get());
/* just a helper for inheriting classes */
if (priv->resize_obj)
{
Evas_Object *r_obj = priv->resize_obj;
priv->resize_obj = NULL;
elm_widget_resize_object_set(obj, r_obj);
}
}
static Evas_Object *