[elm_widget] Enable not to add resize object to or delete resize object from smart member when the resize object is set.
Summary: Currently if the third argument of elm_widget_resize_object_set, 'Eina_Bool sub_obj', indicates whether a resize object is added to/deleted from the sub object or not. This commit makes the third argument, 'sub_obj', also indicate whether a resize object is added to/deleted from the smart member or not. Reviewers: Hermet, seoz Reviewed By: seoz CC: seoz Differential Revision: https://phab.enlightenment.org/D268
This commit is contained in:
parent
9bd1c3ae5a
commit
3f2415fff8
|
@ -1190,9 +1190,8 @@ _elm_widget_sub_object_del(Eo *obj, void *_pd, va_list *list)
|
||||||
/*
|
/*
|
||||||
* @internal
|
* @internal
|
||||||
*
|
*
|
||||||
* a resize object is a smart member of the parent.
|
* a resize object is added to and deleted from the smart member and the sub object
|
||||||
* a resize object is added to and deleted from the sub object of the parent
|
* of the parent if the third argument, Eina_Bool sub_obj, is set as EINA_TRUE.
|
||||||
* if the third argument, Eina_Bool sub_obj, is set as EINA_TRUE.
|
|
||||||
*/
|
*/
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_widget_resize_object_set(Evas_Object *obj,
|
elm_widget_resize_object_set(Evas_Object *obj,
|
||||||
|
@ -1215,7 +1214,7 @@ _elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list)
|
||||||
if (sd->resize_obj == sobj) return;
|
if (sd->resize_obj == sobj) return;
|
||||||
|
|
||||||
// orphan previous resize obj
|
// orphan previous resize obj
|
||||||
if (sd->resize_obj)
|
if (sd->resize_obj && sub_obj)
|
||||||
{
|
{
|
||||||
evas_object_clip_unset(sd->resize_obj);
|
evas_object_clip_unset(sd->resize_obj);
|
||||||
evas_object_smart_member_del(sd->resize_obj);
|
evas_object_smart_member_del(sd->resize_obj);
|
||||||
|
@ -1224,8 +1223,7 @@ _elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
if (elm_widget_focus_get(sd->resize_obj)) _parents_unfocus(obj);
|
if (elm_widget_focus_get(sd->resize_obj)) _parents_unfocus(obj);
|
||||||
}
|
}
|
||||||
|
elm_widget_sub_object_del(obj, sd->resize_obj);
|
||||||
if (sub_obj) elm_widget_sub_object_del(obj, sd->resize_obj);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sd->resize_obj = sobj;
|
sd->resize_obj = sobj;
|
||||||
|
@ -1246,9 +1244,11 @@ _elm_widget_resize_object_set(Eo *obj, void *_pd, va_list *list)
|
||||||
elm_widget_sub_object_del(parent, sobj);
|
elm_widget_sub_object_del(parent, sobj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sub_obj) elm_widget_sub_object_add(obj, sobj);
|
if (sub_obj)
|
||||||
|
{
|
||||||
evas_object_smart_member_add(sobj, obj);
|
elm_widget_sub_object_add(obj, sobj);
|
||||||
|
evas_object_smart_member_add(sobj, obj);
|
||||||
|
}
|
||||||
|
|
||||||
_smart_reconfigure(sd);
|
_smart_reconfigure(sd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue