forked from enlightenment/efl
Elementary toolbar: Fix flickering issue from resizing the box multiple times
Summary: The toolbar's box was resized in _sizing_eval(), _resize_job(). In _sizing_eval(), the box was resized according to its minimum size. And in _resize_job(), toolbar would recalculate it and resize the box again. If _sizing_eval() was called after resizing the box properly from _resize_job(), the box was shrank before calling the next job. If the box's minimum size is needed for calculation in the job callback, it shouldn't change box's size before the job callback. @fix Test Plan: N/A Reviewers: jaehwan, eagleeye, woohyun, cedric Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3911
This commit is contained in:
parent
b208ae9d9e
commit
c0fa31d6f4
|
@ -370,7 +370,8 @@ _resize_job(void *data)
|
||||||
elm_interface_scrollable_content_viewport_geometry_get
|
elm_interface_scrollable_content_viewport_geometry_get
|
||||||
(obj, NULL, NULL, &vw, &vh);
|
(obj, NULL, NULL, &vw, &vh);
|
||||||
evas_object_size_hint_min_get(sd->bx, &mw, &mh);
|
evas_object_size_hint_min_get(sd->bx, &mw, &mh);
|
||||||
evas_object_geometry_get(sd->bx, NULL, NULL, &w, &h);
|
w = sd->minw_bx;
|
||||||
|
h = sd->minh_bx;
|
||||||
|
|
||||||
if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_MENU)
|
if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_MENU)
|
||||||
{
|
{
|
||||||
|
@ -1536,7 +1537,10 @@ _sizing_eval(Evas_Object *obj)
|
||||||
minh_bx = vh;
|
minh_bx = vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_object_resize(sd->bx, minw_bx, minh_bx);
|
/* Keep the box's minimum size for a moment.
|
||||||
|
It will be used for resizing the box in _resize_job() function. */
|
||||||
|
sd->minw_bx = minw_bx;
|
||||||
|
sd->minh_bx = minh_bx;
|
||||||
evas_object_resize(sd->more, minw_bx, minh_bx);
|
evas_object_resize(sd->more, minw_bx, minh_bx);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, -1, -1);
|
evas_object_size_hint_max_set(obj, -1, -1);
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct _Elm_Toolbar_Data
|
||||||
int theme_icon_size, priv_icon_size,
|
int theme_icon_size, priv_icon_size,
|
||||||
icon_size;
|
icon_size;
|
||||||
int standard_priority;
|
int standard_priority;
|
||||||
|
int minw_bx, minh_bx;
|
||||||
unsigned int item_count;
|
unsigned int item_count;
|
||||||
unsigned int separator_count;
|
unsigned int separator_count;
|
||||||
double align;
|
double align;
|
||||||
|
|
Loading…
Reference in New Issue