forked from enlightenment/efl
efl_page_transition_scroll: code refactoring in curr_page_change function
- removed unnecesary codes - moved codes for better cohesion
This commit is contained in:
parent
1645be2d49
commit
99a55142b5
|
@ -428,35 +428,20 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
|
||||||
}
|
}
|
||||||
pi->pos = pi->id - (pd->side_page_num + 1);
|
pi->pos = pi->id - (pd->side_page_num + 1);
|
||||||
|
|
||||||
if (!target) return;
|
|
||||||
|
|
||||||
EINA_RECTANGLE_SET(&pi->temp,
|
EINA_RECTANGLE_SET(&pi->temp,
|
||||||
target->geometry.x,
|
target->geometry.x,
|
||||||
target->geometry.y,
|
target->geometry.y,
|
||||||
target->geometry.w,
|
target->geometry.w,
|
||||||
target->geometry.h);
|
target->geometry.h);
|
||||||
|
}
|
||||||
|
|
||||||
if (eina_rectangles_intersect(&pi->temp, &pd->viewport) &&
|
EINA_LIST_FOREACH(pd->page_infos, list, pi)
|
||||||
(pi->id != 0) && (pi->id != (pd->page_info_num - 1)))
|
{
|
||||||
{
|
EINA_RECTANGLE_SET(&pi->geometry,
|
||||||
pi->vis_page = EINA_TRUE;
|
pi->temp.x,
|
||||||
pi->visible = EINA_TRUE;
|
pi->temp.y,
|
||||||
efl_canvas_object_clip_set(pi->obj, pd->foreclip);
|
pi->temp.w,
|
||||||
}
|
pi->temp.h);
|
||||||
else
|
|
||||||
{
|
|
||||||
pi->vis_page = EINA_FALSE;
|
|
||||||
pi->visible = EINA_FALSE;
|
|
||||||
efl_canvas_object_clip_set(pi->obj, pd->backclip);
|
|
||||||
if (pi->content)
|
|
||||||
{
|
|
||||||
efl_pack_unpack(pi->obj, pi->content);
|
|
||||||
efl_canvas_object_clip_set(pi->content, pd->backclip);
|
|
||||||
|
|
||||||
pi->content_num = -1;
|
|
||||||
pi->content = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EINA_DBL_EQ(pos, 1.0))
|
if (EINA_DBL_EQ(pos, 1.0))
|
||||||
|
@ -469,15 +454,6 @@ _efl_page_transition_scroll_curr_page_change(Eo *obj EINA_UNUSED,
|
||||||
pd->head = pd->head->prev;
|
pd->head = pd->head->prev;
|
||||||
pd->tail = pd->tail->prev;
|
pd->tail = pd->tail->prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
EINA_LIST_FOREACH(pd->page_infos, list, pi)
|
|
||||||
{
|
|
||||||
EINA_RECTANGLE_SET(&pi->geometry,
|
|
||||||
pi->temp.x,
|
|
||||||
pi->temp.y,
|
|
||||||
pi->temp.w,
|
|
||||||
pi->temp.h);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static int
|
EOLIAN static int
|
||||||
|
|
Loading…
Reference in New Issue