summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_page_indicator_icon.c
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2019-01-25 11:17:19 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2019-01-25 14:26:12 +0900
commitc442c0972a84d2c9032e15623c644f391b20cdc2 (patch)
treecdeb72efd21f5de6001ea47dd129a4d7ccab30fa /src/lib/elementary/efl_page_indicator_icon.c
parenta91197537c1f9a0e71d93978a0d4aad93f6e577b (diff)
efl_page_indicator_icon: refactor if-else statement
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_page_indicator_icon.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_page_indicator_icon.c b/src/lib/elementary/efl_page_indicator_icon.c
index 0c7f939fb1..58bf075329 100644
--- a/src/lib/elementary/efl_page_indicator_icon.c
+++ b/src/lib/elementary/efl_page_indicator_icon.c
@@ -53,20 +53,13 @@ _efl_page_indicator_icon_pack(Eo *obj,
53 EFL_PAGE_INDICATOR_DATA_GET(obj, spd); 53 EFL_PAGE_INDICATOR_DATA_GET(obj, spd);
54 Eo *item, *existing; 54 Eo *item, *existing;
55 55
56 efl_page_indicator_pack(efl_super(obj, MY_CLASS), index);
57
58 item = efl_add(EFL_CANVAS_LAYOUT_CLASS, spd->idbox); 56 item = efl_add(EFL_CANVAS_LAYOUT_CLASS, spd->idbox);
59 elm_widget_theme_object_set(spd->idbox, item, 57 elm_widget_theme_object_set(spd->idbox, item,
60 "pager", "indicator", "default"); 58 "pager", "indicator", "default");
61 efl_gfx_size_hint_align_set(item, 0.5, 0.5); 59 efl_gfx_size_hint_align_set(item, 0.5, 0.5);
62 efl_gfx_size_hint_weight_set(item, 0, 0); 60 efl_gfx_size_hint_weight_set(item, 0, 0);
63 61
64 if (index == 0) 62 if (index == spd->cnt)
65 {
66 pd->items = eina_list_prepend(pd->items, item);
67 efl_pack_begin(spd->idbox, item);
68 }
69 else if (index == (spd->cnt - 1))
70 { 63 {
71 pd->items = eina_list_append(pd->items, item); 64 pd->items = eina_list_append(pd->items, item);
72 efl_pack_end(spd->idbox, item); 65 efl_pack_end(spd->idbox, item);
@@ -77,6 +70,8 @@ _efl_page_indicator_icon_pack(Eo *obj,
77 pd->items = eina_list_prepend_relative(pd->items, item, existing); 70 pd->items = eina_list_prepend_relative(pd->items, item, existing);
78 efl_pack_before(spd->idbox, item, existing); 71 efl_pack_before(spd->idbox, item, existing);
79 } 72 }
73
74 efl_page_indicator_pack(efl_super(obj, MY_CLASS), index);
80} 75}
81 76
82EOLIAN static void 77EOLIAN static void