elc_popup: apply tizen color class feature for popup 87/248187/2
authorTaehyub Kim <taehyub.kim@samsung.com>
Mon, 23 Nov 2020 10:23:01 +0000 (19:23 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Mon, 23 Nov 2020 10:29:45 +0000 (19:29 +0900)
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

src/lib/elementary/efl_ui_widget.c
src/lib/elementary/elc_popup.c

index 6030923..257bc28 100644 (file)
@@ -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,
index 8ba0b6d..45372dd 100644 (file)
@@ -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.                         *
     ***********************************************************************************/