forked from enlightenment/efl
efl_ui_popup_alert_scroll: check sizing evaluation while scroller is changed
Summary: add a sizing check variable for safety of sizing evaluation when the min size of scroller is changed. Test Plan: 1. run elementary_test 2. search the sample with "popup" keyword 3. click the Efl Ui Popup Alert Scroll sample Reviewers: Jaehyun_Cho, jpeg, woohyun, thiepha, Blackmole, cedric Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5204
This commit is contained in:
parent
2e9042fae1
commit
f5010b7ba6
|
@ -18,6 +18,8 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Evas_Coord mi
|
|||
Evas_Coord w, h;
|
||||
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
|
||||
|
||||
pd->is_sizing_eval = EINA_TRUE;
|
||||
|
||||
if (pd->is_expandable_w && !pd->is_expandable_h)
|
||||
{
|
||||
if ((pd->max_scroll_w > -1) && (minw > pd->max_scroll_w))
|
||||
|
@ -59,11 +61,15 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd, Evas_Coord mi
|
|||
evas_object_resize(obj, pd->max_scroll_w, pd->max_scroll_h);
|
||||
}
|
||||
}
|
||||
|
||||
pd->is_sizing_eval = EINA_FALSE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_popup_alert_scroll_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Popup_Alert_Scroll_Data *pd)
|
||||
{
|
||||
if (pd->is_sizing_eval) return;
|
||||
|
||||
elm_layout_sizing_eval(efl_super(obj, MY_CLASS));
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
|
|
|
@ -12,6 +12,7 @@ struct _Efl_Ui_Popup_Alert_Scroll_Data
|
|||
Evas_Coord max_scroll_h;
|
||||
Eina_Bool is_expandable_w;
|
||||
Eina_Bool is_expandable_h;
|
||||
Eina_Bool is_sizing_eval;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue