elm_index: keep backward compatibility on size calculation 51/224251/1
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 7 Feb 2020 06:54:01 +0000 (15:54 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 7 Feb 2020 07:23:01 +0000 (16:23 +0900)
To keep backward compatibility on size calculation, elm_index implements
group_calculate and the size calculation in the removed sizing_eval is
added to the implemented group_calculate in elm_index.

Change-Id: I4f848ec17f091976f8a221a9dac086db9ee5823d

src/lib/elementary/elm_index.c

index 3eb4763..3aeca7a 100644 (file)
@@ -644,6 +644,17 @@ _elm_index_efl_ui_widget_theme_apply(Eo *obj, Elm_Index_Data *sd)
 }
 
 EOLIAN static void
+_elm_index_efl_canvas_group_group_calculate(Eo *obj, Elm_Index_Data *_pd EINA_UNUSED)
+{
+   Evas_Coord minw = -1, minh = -1;
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+
+   edje_object_size_min_calc(wd->resize_obj, &minw, &minh);
+   evas_object_size_hint_min_set(obj, minw, minh);
+   evas_object_size_hint_max_set(obj, -1, -1);
+}
+
+EOLIAN static void
 _elm_index_item_efl_object_destructor(Eo *eo_item EINA_UNUSED, Elm_Index_Item_Data *it)
 {
    ELM_INDEX_DATA_GET(WIDGET(it), sd);
@@ -2041,6 +2052,7 @@ _elm_index_item_elm_widget_item_signal_emit(Eo *eo_it EINA_UNUSED, Elm_Index_Ite
 /* Internal EO APIs and hidden overrides */
 
 #define ELM_INDEX_EXTRA_OPS \
+   EFL_CANVAS_GROUP_CALC_OPS(elm_index), \
    EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_index)
 
 #include "elm_index_item_eo.c"