From: Taehyub Kim Date: Mon, 23 Nov 2020 10:23:01 +0000 (+0900) Subject: elc_popup: apply tizen color class feature for popup X-Git-Tag: accepted/tizen/unified/20201130.122951~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b03caf30f155c4210fa9171605b9a1ba23e162e6;p=platform%2Fupstream%2Fefl.git elc_popup: apply tizen color class feature for popup popup main_layout is not a resize object of popup. so when elm_layout_edje_get(popup) is called, popup resize object cannot be returned. This makes tizen color class feature not working. so forwarding edje object of popup main_layout when color class api is called. Change-Id: I86107382f49417575a5d6bcc106d02ba1de4ca9d --- diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 6030923..257bc28 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -9088,7 +9088,12 @@ _elm_widget_class_color_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, cons if (!efl_isa(obj, EFL_UI_LAYOUT_BASE_CLASS)) return EINA_FALSE; - edje = elm_layout_edje_get(obj); + // TIZEN_ONLY_FEATURE: apply Tizen's color_class feature for popup + if (efl_isa(obj, ELM_POPUP_CLASS)) + edje = evas_object_data_get(obj, "popup_layout_edje"); + // + else + edje = elm_layout_edje_get(obj); int_ret &= _elm_widget_color_class_set_internal(obj, edje, color_class, r, g, b, a, -1, -1, -1, -1, @@ -9106,7 +9111,12 @@ _elm_widget_class_color_get(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, cons if (!efl_isa(obj, EFL_UI_LAYOUT_BASE_CLASS)) return EINA_FALSE; - edje = elm_layout_edje_get(obj); + // TIZEN_ONLY_FEATURE: apply Tizen's color_class feature for popup + if (efl_isa(obj, ELM_POPUP_CLASS)) + edje = evas_object_data_get(obj, "popup_layout_edje"); + // + else + edje = elm_layout_edje_get(obj); int_ret &= _elm_widget_color_class_get_internal(obj, edje, color_class, r, g, b, a, NULL, NULL, NULL, NULL, diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 8ba0b6d..45372dd 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -2213,6 +2213,10 @@ _elm_popup_efl_canvas_group_group_add(Eo *obj, Elm_Popup_Data *priv) elm_widget_style_get(obj))) CRI("Failed to set layout!"); + // TIZEN_ONLY_FEATURE: apply Tizen's color_class feature for popup + evas_object_data_get(obj, "popup_layout_edje", elm_layout_edje_get(priv->main_layout)); + // + /*********************************************************************************** * TIZEN_ONLY_FEATURE: apply Tizen's color_class features. * ***********************************************************************************/