summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2018-07-18 12:10:17 +0900
committerHermet Park <hermetpark@gmail.com>2018-07-18 12:10:17 +0900
commit2916cfd86b74d76cab02242a02fd2412588c06a0 (patch)
treef01f94b0fc140b8f56cc2d2d4f5d5457bd801f27
parentdf13fb4a7004a61a989f258b322bdeac22a4afae (diff)
efl_ui_layout_object: Fix not to use background/shadow part interface in legacy
Summary: "background" and "shadow" part interface was designed to be used in efl ui interface only. Therefore, "background" and "shadow" part interface is not used in legacy. Test Plan: Calls elm_object_part_content_set(layout, "background", content); for legacy layout. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6595
-rw-r--r--src/lib/elementary/efl_ui_layout_object.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/lib/elementary/efl_ui_layout_object.c b/src/lib/elementary/efl_ui_layout_object.c
index a98e5c3b57..9dc050fda1 100644
--- a/src/lib/elementary/efl_ui_layout_object.c
+++ b/src/lib/elementary/efl_ui_layout_object.c
@@ -2250,27 +2250,30 @@ _efl_ui_layout_object_efl_part_part_get(const Eo *obj, Efl_Ui_Layout_Object_Data
2250 // Check part type without using edje_object_part_object_get(), as this 2250 // Check part type without using edje_object_part_object_get(), as this
2251 // can cause recalc, which has side effects... and could be slow. 2251 // can cause recalc, which has side effects... and could be slow.
2252 2252
2253 if (eina_streq(part, "background")) 2253 if (!elm_widget_is_legacy(obj))
2254 { 2254 {
2255 if (efl_layout_group_part_exist_get(wd->resize_obj, "efl.background")) 2255 if (eina_streq(part, "background"))
2256 type = efl_canvas_layout_part_type_get(efl_part(wd->resize_obj, "efl.background"));
2257 if (type != EFL_CANVAS_LAYOUT_PART_TYPE_SWALLOW)
2258 { 2256 {
2259 if (type < EFL_CANVAS_LAYOUT_PART_TYPE_LAST && 2257 if (efl_layout_group_part_exist_get(wd->resize_obj, "efl.background"))
2260 type > EFL_CANVAS_LAYOUT_PART_TYPE_NONE) 2258 type = efl_canvas_layout_part_type_get(efl_part(wd->resize_obj, "efl.background"));
2259 if (type != EFL_CANVAS_LAYOUT_PART_TYPE_SWALLOW)
2261 { 2260 {
2262 const char *file = NULL, *key = NULL; 2261 if (type < EFL_CANVAS_LAYOUT_PART_TYPE_LAST &&
2263 efl_file_get(wd->resize_obj, &file, &key); 2262 type > EFL_CANVAS_LAYOUT_PART_TYPE_NONE)
2264 WRN("Layout has a background but it's not a swallow: '%s'", 2263 {
2265 elm_widget_theme_element_get(obj)); 2264 const char *file = NULL, *key = NULL;
2265 efl_file_get(wd->resize_obj, &file, &key);
2266 WRN("Layout has a background but it's not a swallow: '%s'",
2267 elm_widget_theme_element_get(obj));
2268 }
2269 return efl_part_get(efl_super(obj, MY_CLASS), part);
2266 } 2270 }
2267 return efl_part_get(efl_super(obj, MY_CLASS), part);
2268 }
2269 2271
2270 return ELM_PART_IMPLEMENT(EFL_UI_LAYOUT_PART_BG_CLASS, obj, part); 2272 return ELM_PART_IMPLEMENT(EFL_UI_LAYOUT_PART_BG_CLASS, obj, part);
2273 }
2274 else if (eina_streq(part, "shadow"))
2275 return efl_part_get(efl_super(obj, MY_CLASS), part);
2271 } 2276 }
2272 else if (eina_streq(part, "shadow"))
2273 return efl_part_get(efl_super(obj, MY_CLASS), part);
2274 2277
2275 if (!efl_layout_group_part_exist_get(wd->resize_obj, part)) 2278 if (!efl_layout_group_part_exist_get(wd->resize_obj, part))
2276 { 2279 {