From f54db5cf5c622abcd055055f2279d4249d1f2407 Mon Sep 17 00:00:00 2001 From: hermet Date: Wed, 28 Mar 2012 10:03:45 +0000 Subject: [PATCH] elementary/widget - fixed to update the some status -color, clip, visibitliy- even if the memebers are added later. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69701 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_widget.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index b09eee9..f51ff01 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -174,6 +174,7 @@ static void _smart_clip_set(Evas_Object *obj, Evas_Object *clip); static void _smart_clip_unset(Evas_Object *obj); static void _smart_calculate(Evas_Object *obj); +static void _smart_member_add(Evas_Object *obj, Evas_Object *child); static void _smart_init(void); static void _if_focused_revert(Evas_Object *obj, @@ -1120,7 +1121,6 @@ elm_widget_resize_object_set(Evas_Object *obj, evas_object_event_callback_add(sobj, EVAS_CALLBACK_HIDE, _sub_obj_hide, sd); } - evas_object_clip_set(sobj, evas_object_clip_get(obj)); evas_object_smart_member_add(sobj, obj); evas_object_event_callback_add(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd); @@ -3848,6 +3848,24 @@ _smart_calculate(Evas_Object *obj) if (sd->changed_func) sd->changed_func(obj); } +static void +_smart_member_add(Evas_Object *obj, Evas_Object *child) +{ + int r, g, b, a; + + if (evas_object_data_get(child, "_elm_leaveme")) return; + + evas_object_color_get(obj, &r, &g, &b, &a); + evas_object_color_set(child, r, g, b, a); + + evas_object_clip_set(child, evas_object_clip_get(obj)); + + if (evas_object_visible_get(obj)) + evas_object_show(child); + else + evas_object_hide(child); +} + /* never need to touch this */ static void _smart_init(void) @@ -3868,7 +3886,7 @@ _smart_init(void) _smart_clip_set, _smart_clip_unset, _smart_calculate, - NULL, + _smart_member_add, NULL, NULL, NULL, -- 2.7.4