From 22ea7e5b105a7df31f07f961a5b460014a3139e0 Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Wed, 22 Jul 2020 19:20:09 +0900 Subject: [PATCH] elementary: modify to call group_calculate after creating user can't get min size for check/radios that have a min size definition of edc just right after creating the objects. user can get it after once it executes group_calculate. to keep behavior backward compatability, this patch calls group_calculate after creating the objects @tizen_fix Co-authored-by: Wonki Kim Change-Id: Icd08b60a516cc3ba4b5472bc013fddc5089d0a9a --- src/lib/elementary/efl_ui_button.c | 7 ++++++- src/lib/elementary/efl_ui_check.c | 8 +++++++- src/lib/elementary/efl_ui_progressbar.c | 3 +++ src/lib/elementary/efl_ui_radio.c | 7 ++++++- src/lib/elementary/elm_datetime.c | 7 ++++++- src/lib/elementary/elm_slider.c | 7 ++++++- src/lib/elementary/elm_spinner.c | 7 ++++++- 7 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c index 3115591..20b96bd 100644 --- a/src/lib/elementary/efl_ui_button.c +++ b/src/lib/elementary/efl_ui_button.c @@ -500,7 +500,12 @@ EAPI Evas_Object * elm_button_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(EFL_UI_BUTTON_LEGACY_CLASS, parent); + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + //return elm_legacy_add(EFL_UI_BUTTON_LEGACY_CLASS, parent); + Evas_Object *obj = elm_legacy_add(EFL_UI_BUTTON_LEGACY_CLASS, parent); + if (obj) efl_canvas_group_calculate(obj); + return obj; + // } #include "efl_ui_button_legacy_eo.c" diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index be1655d..318c9b8 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -519,7 +519,13 @@ EAPI Evas_Object * elm_check_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(EFL_UI_CHECK_LEGACY_CLASS, parent); + + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + //return elm_legacy_add(EFL_UI_CHECK_LEGACY_CLASS, parent); + Evas_Object *obj = elm_legacy_add(EFL_UI_CHECK_LEGACY_CLASS, parent); + if (obj) efl_canvas_group_calculate(obj); + return obj; + // } #include "efl_ui_check_legacy_eo.c" diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c index eadb0cc..c1b60d2 100644 --- a/src/lib/elementary/efl_ui_progressbar.c +++ b/src/lib/elementary/efl_ui_progressbar.c @@ -867,6 +867,9 @@ elm_progressbar_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); Eo *obj = elm_legacy_add(EFL_UI_PROGRESSBAR_LEGACY_CLASS, parent); + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + if (obj) efl_canvas_group_calculate(obj); + // //TIZEN_ONLY(20180212): default of unit format is NULL in Tizen UX. //elm_progressbar_unit_format_set(obj, "%.0f %%"); diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c index 7eb0fa7..f4fa617 100644 --- a/src/lib/elementary/efl_ui_radio.c +++ b/src/lib/elementary/efl_ui_radio.c @@ -402,7 +402,12 @@ EAPI Evas_Object * elm_radio_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(EFL_UI_RADIO_LEGACY_CLASS, parent); + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + //return elm_legacy_add(EFL_UI_RADIO_LEGACY_CLASS, parent); + Evas_Object *obj = elm_legacy_add(EFL_UI_RADIO_LEGACY_CLASS, parent); + if (obj) efl_canvas_group_calculate(obj); + return obj; + // } EAPI void diff --git a/src/lib/elementary/elm_datetime.c b/src/lib/elementary/elm_datetime.c index 42067a1..087c2d3 100644 --- a/src/lib/elementary/elm_datetime.c +++ b/src/lib/elementary/elm_datetime.c @@ -40,7 +40,12 @@ EAPI Evas_Object * elm_datetime_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(EFL_UI_CLOCK_LEGACY_CLASS, parent); + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + //return elm_legacy_add(EFL_UI_CLOCK_LEGACY_CLASS, parent); + Evas_Object *obj = elm_legacy_add(EFL_UI_CLOCK_LEGACY_CLASS, parent); + if (obj) efl_canvas_group_calculate(obj); + return obj; + // } EAPI void diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c index 96c5dc4..c862198 100644 --- a/src/lib/elementary/elm_slider.c +++ b/src/lib/elementary/elm_slider.c @@ -1560,7 +1560,12 @@ EAPI Evas_Object * elm_slider_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(MY_CLASS, parent); + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + //return elm_legacy_add(MY_CLASS, parent); + Evas_Object *obj = elm_legacy_add(MY_CLASS, parent); + if (obj) efl_canvas_group_calculate(obj); + return obj; + // } EAPI void diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c index b22b0a6..8d6d3a4 100644 --- a/src/lib/elementary/elm_spinner.c +++ b/src/lib/elementary/elm_spinner.c @@ -2337,7 +2337,12 @@ EAPI Evas_Object * elm_spinner_add(Evas_Object *parent) { EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); - return elm_legacy_add(MY_CLASS, parent); + //TIZEN_ONLY(20200722): modify to call group_calculate after creating + //return elm_legacy_add(MY_CLASS, parent); + Evas_Object *obj = elm_legacy_add(MY_CLASS, parent); + if (obj) efl_canvas_group_calculate(obj); + return obj; + // } EAPI void -- 2.7.4