summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2019-01-23 21:17:29 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2019-01-25 13:47:37 +0900
commit716590db50832be9ba72ee8810abb15a5a93fa64 (patch)
tree80e20fd3220f54025902b2839ffa603ce88de1a2 /src/lib/elementary
parent933bc7f6e11e4966547357885b47379be650fe4a (diff)
efl_ui_pager: set current page as -1 when pager is empty
it makes more sense that the current page number is -1 when pager is empty since numbering starts from 0 when pager actually contains pages. this patch also fixes a bug in pack_begin function, in which the current page is increased by 1.
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_pager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elementary/efl_ui_pager.c b/src/lib/elementary/efl_ui_pager.c
index 4b84ea795e..e0e3313906 100644
--- a/src/lib/elementary/efl_ui_pager.c
+++ b/src/lib/elementary/efl_ui_pager.c
@@ -339,7 +339,7 @@ _efl_ui_pager_efl_object_constructor(Eo *obj,
339 pd->cnt = 0; 339 pd->cnt = 0;
340 pd->loop = EFL_UI_PAGER_LOOP_DISABLED; 340 pd->loop = EFL_UI_PAGER_LOOP_DISABLED;
341 341
342 pd->curr.page = 0; 342 pd->curr.page = -1;
343 pd->curr.pos = 0.0; 343 pd->curr.pos = 0.0;
344 344
345 pd->transition = NULL; 345 pd->transition = NULL;
@@ -424,6 +424,7 @@ _efl_ui_pager_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
424 pd->content_list = eina_list_append(pd->content_list, subobj); 424 pd->content_list = eina_list_append(pd->content_list, subobj);
425 425
426 pd->cnt++; 426 pd->cnt++;
427 if (pd->curr.page == -1) pd->curr.page = 0;
427 428
428 if (pd->transition) 429 if (pd->transition)
429 efl_page_transition_update(pd->transition, pd->curr.pos); 430 efl_page_transition_update(pd->transition, pd->curr.pos);