forked from enlightenment/efl
genlist: fix item show/bring in coordinate calculation with zero-sized pan.
Summary: item show and bring can be processed with zero-sized pan. item's coordinate will be calculated with this zero-sized pan, so target position of scroll region bring in is not proper. it occurs wrong result of SCROLLTO_MIDDLE and SCROLLTO_BOTTOM cases. now we check pan size, and if less than 1, deferred call. Test Plan: please test with attached file. ./main 8 4 : 8th item go to middle ./main 8 8 : 8th item go to bottom (bottom case may need D7035 as precede patch) {F3311262} Reviewers: Hermet, eagleeye Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7037
This commit is contained in:
parent
c9060ca997
commit
b1650ca471
|
@ -639,6 +639,7 @@ _item_scroll(Elm_Genlist_Data *sd)
|
|||
dh = oh;
|
||||
|
||||
if (dw < 1) return;
|
||||
if (ow < 1 || oh < 1) return;
|
||||
|
||||
switch (sd->scroll_to_type)
|
||||
{
|
||||
|
@ -7191,7 +7192,10 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
|
|||
if ((it->item->queued) || (!it->item->mincalcd) || (sd->queue))
|
||||
deferred_show = EINA_TRUE;
|
||||
}
|
||||
else if (it->item->block->w < 1) deferred_show = EINA_TRUE;
|
||||
if (it->item->block->w < 1) deferred_show = EINA_TRUE;
|
||||
|
||||
evas_object_geometry_get(sd->pan_obj, NULL, NULL, w, h);
|
||||
if (*w < 1 || *h < 1) deferred_show = EINA_TRUE;
|
||||
|
||||
if (deferred_show)
|
||||
{
|
||||
|
@ -7213,7 +7217,6 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
|
|||
sd->show_item = NULL;
|
||||
}
|
||||
|
||||
evas_object_geometry_get(sd->pan_obj, NULL, NULL, w, h);
|
||||
switch (type)
|
||||
{
|
||||
case ELM_GENLIST_ITEM_SCROLLTO_IN:
|
||||
|
|
Loading…
Reference in New Issue