summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_dayselector.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-30 13:11:48 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-07-30 13:12:52 -0400
commit7e517e2a1196207bbfe76ce9ab12be3093d9afc5 (patch)
tree106c98b6ad2720f0504b7d254e4efdfcd4cec253 /src/lib/elementary/elm_dayselector.c
parent586f41f92772ab789364bcd788e7717f92ba86de (diff)
elm/efl_ui: remove elm_layout_sizing_eval implementations
Summary: historically there have been two methods of calculating sizes in elm: * elm_layout_sizing_eval * evas_object_smart_calculate (now efl_canvas_group_calculate) the former was used to set size hints on widgets, while the latter was used to perform internal size calcs for the widget. for things to work correctly, these functions had to be triggered in just the right order at just the right time. many hard-to-fix bugs related to widget sizing over the years have been the result of this split this patch removes elm_layout_sizing_eval implementations so that all widgets perform both internal size calcs and size hint setting all in the same function, ensuring that these are always in sync the result is that in the vast majority of cases, far fewer recalcs happen for widgets, and they are quicker to achieve their final size Depends on D9438 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl_widgets Maniphest Tasks: T8059 Differential Revision: https://phab.enlightenment.org/D9439
Diffstat (limited to 'src/lib/elementary/elm_dayselector.c')
-rw-r--r--src/lib/elementary/elm_dayselector.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c
index fb5fb5c..29236ed 100644
--- a/src/lib/elementary/elm_dayselector.c
+++ b/src/lib/elementary/elm_dayselector.c
@@ -36,18 +36,6 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
36 {NULL, NULL} 36 {NULL, NULL}
37}; 37};
38 38
39EOLIAN static void
40_elm_dayselector_elm_layout_sizing_eval(Eo *obj, Elm_Dayselector_Data *sd EINA_UNUSED)
41{
42 Evas_Coord min_w = -1, min_h = -1;
43 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
44
45 elm_coords_finger_size_adjust(ELM_DAYSELECTOR_MAX, &min_w, 1, &min_h);
46 edje_object_size_min_restricted_calc
47 (wd->resize_obj, &min_w, &min_h, min_w, min_h);
48 evas_object_size_hint_min_set(obj, min_w, min_h);
49}
50
51static void 39static void
52_dayselector_resize(void *data, 40_dayselector_resize(void *data,
53 Evas *e EINA_UNUSED, 41 Evas *e EINA_UNUSED,
@@ -452,6 +440,7 @@ _elm_dayselector_efl_canvas_group_group_add(Eo *obj, Elm_Dayselector_Data *priv)
452 priv->week_start = _elm_config->week_start; 440 priv->week_start = _elm_config->week_start;
453 priv->weekend_start = _elm_config->weekend_start; 441 priv->weekend_start = _elm_config->weekend_start;
454 priv->weekend_len = _elm_config->weekend_len; 442 priv->weekend_len = _elm_config->weekend_len;
443 efl_ui_layout_finger_size_multiplier_set(obj, ELM_DAYSELECTOR_MAX, 1);
455 _items_create(obj); 444 _items_create(obj);
456 445
457 evas_object_event_callback_add 446 evas_object_event_callback_add
@@ -648,7 +637,6 @@ ELM_PART_OVERRIDE_CONTENT_UNSET(elm_dayselector, ELM_DAYSELECTOR, Elm_Dayselecto
648/* Internal EO APIs and hidden overrides */ 637/* Internal EO APIs and hidden overrides */
649 638
650#define ELM_DAYSELECTOR_EXTRA_OPS \ 639#define ELM_DAYSELECTOR_EXTRA_OPS \
651 ELM_LAYOUT_SIZING_EVAL_OPS(elm_dayselector), \
652 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_dayselector) 640 EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_dayselector)
653 641
654#include "elm_dayselector_eo.c" 642#include "elm_dayselector_eo.c"