efl_page_transition_scroll: bug fix in update function
since page_infos are connected in a circular manner, one node (head or tail) moves in the opposite direction when scrolled. there was a bug in hiding such nodes and this patch fixes it.
This commit is contained in:
parent
549bf6e269
commit
690269e055
|
@ -303,7 +303,7 @@ _efl_page_transition_scroll_update(Eo *obj,
|
||||||
int tmp_id, curr_page, cnt;
|
int tmp_id, curr_page, cnt;
|
||||||
Eo *tmp;
|
Eo *tmp;
|
||||||
Eina_List *list;
|
Eina_List *list;
|
||||||
Page_Info *pi, *tpi;
|
Page_Info *pi, *tpi, *dummy;
|
||||||
|
|
||||||
t = pos;
|
t = pos;
|
||||||
if (t < 0) t *= (-1);
|
if (t < 0) t *= (-1);
|
||||||
|
@ -330,8 +330,6 @@ _efl_page_transition_scroll_update(Eo *obj,
|
||||||
|
|
||||||
efl_gfx_entity_geometry_set(pi->obj, (Eina_Rect) pi->temp);
|
efl_gfx_entity_geometry_set(pi->obj, (Eina_Rect) pi->temp);
|
||||||
|
|
||||||
if (!pi->vis_page && !tpi->vis_page) continue;
|
|
||||||
|
|
||||||
if (!eina_rectangles_intersect(&pi->temp, &pd->viewport))
|
if (!eina_rectangles_intersect(&pi->temp, &pd->viewport))
|
||||||
{
|
{
|
||||||
if (pi->content)
|
if (pi->content)
|
||||||
|
@ -379,6 +377,20 @@ _efl_page_transition_scroll_update(Eo *obj,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pos < 0) dummy = pd->tail;
|
||||||
|
else dummy = pd->head;
|
||||||
|
|
||||||
|
if (dummy->visible)
|
||||||
|
{
|
||||||
|
efl_canvas_object_clip_set(dummy->obj, pd->backclip);
|
||||||
|
efl_pack_unpack(dummy->obj, dummy->content);
|
||||||
|
efl_canvas_object_clip_set(dummy->content, pd->backclip);
|
||||||
|
|
||||||
|
dummy->content_num = -1;
|
||||||
|
dummy->content = NULL;
|
||||||
|
dummy->visible = EINA_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
|
Loading…
Reference in New Issue