toolbar: content_set function called when user content set to toolbar item.
Summary: If User want to content set something to item area. there is no way to except elm customizing. So i added this feature and make the toolbar item object to layout before. Now user can content set something on item area only call "elm_object_item_part_content_set" API. Test Plan: Make some swallow part on toolbar edc. and content set some layout to that swallow part to using "elm_object_item_part_content_set" Reviewers: cedric, Hermet Subscribers: SanghyeonLee, eagleeye, id213sin Differential Revision: https://phab.enlightenment.org/D2777
This commit is contained in:
parent
2bf248fbc0
commit
81d5b99d72
|
@ -1577,7 +1577,11 @@ _elm_toolbar_item_elm_widget_item_part_content_set(Eo *eo_item EINA_UNUSED, Elm_
|
|||
|
||||
ELM_TOOLBAR_DATA_GET(obj, sd);
|
||||
|
||||
if (part && strcmp(part, "object")) return;
|
||||
if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
|
||||
{
|
||||
eo_do(VIEW(item), elm_obj_container_content_set(part, content));
|
||||
return;
|
||||
}
|
||||
if (item->object == content) return;
|
||||
|
||||
evas_object_del(item->object);
|
||||
|
@ -1594,7 +1598,14 @@ EOLIAN static Evas_Object *
|
|||
_elm_toolbar_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_Toolbar_Item_Data *it,
|
||||
const char *part)
|
||||
{
|
||||
if (part && strcmp(part, "object")) return NULL;
|
||||
Evas_Object *content;
|
||||
|
||||
if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
|
||||
{
|
||||
eo_do(VIEW(it), content = elm_obj_container_content_get(part));
|
||||
if (content) return content;
|
||||
else return NULL;
|
||||
}
|
||||
return it->object;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue