From c5461c525fbd030c68ad7eecfe05e6ac5fbf553e Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Thu, 13 Dec 2018 17:59:47 +0900 Subject: [PATCH] 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. --- src/lib/elementary/efl_page_transition_scroll.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/lib/elementary/efl_page_transition_scroll.c b/src/lib/elementary/efl_page_transition_scroll.c index 41b7033..71b7bfa 100644 --- a/src/lib/elementary/efl_page_transition_scroll.c +++ b/src/lib/elementary/efl_page_transition_scroll.c @@ -303,7 +303,7 @@ _efl_page_transition_scroll_update(Eo *obj, int tmp_id, curr_page, cnt; Eo *tmp; Eina_List *list; - Page_Info *pi, *tpi; + Page_Info *pi, *tpi, *dummy; t = pos; 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); - if (!pi->vis_page && !tpi->vis_page) continue; - if (!eina_rectangles_intersect(&pi->temp, &pd->viewport)) { 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 -- 2.7.4