rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=45de09ec211676b3f7ab218da9449dc10f7958d3

commit 45de09ec211676b3f7ab218da9449dc10f7958d3
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Thu Mar 31 11:38:13 2016 +0300

    live_widgets: macro for small, middle and huge amount of 
items/content/widgets
---
 src/bin/ui/live_view/elementary/live_genlist.c  | 4 ++--
 src/bin/ui/live_view/elementary/live_list.c     | 2 +-
 src/bin/ui/live_view/elementary/live_scroller.c | 4 ++--
 src/bin/ui/live_view/live_widgets.h             | 4 +++-
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/bin/ui/live_view/elementary/live_genlist.c 
b/src/bin/ui/live_view/elementary/live_genlist.c
index 3425567..6040c4a 100644
--- a/src/bin/ui/live_view/elementary/live_genlist.c
+++ b/src/bin/ui/live_view/elementary/live_genlist.c
@@ -172,7 +172,7 @@ _glist_expanded_cb(void *data __UNUSED__,
         ic->func.state_get = NULL;
         ic->func.del = NULL;
      }
-   for (i = 0; i < ELEMENTS_COUNT; i++)
+   for (i = 0; i < ELEMENTS_MID_COUNT; i++)
      elm_genlist_item_append(obj, ic, eina_stringshare_printf("Item #%d", i),
                              tree_main, ELM_GENLIST_ITEM_NONE, NULL, NULL);
    elm_genlist_item_class_free(ic);
@@ -265,7 +265,7 @@ _create_genlist(Evas_Object *obj, const char *class, const 
char *style)
         ic->func.del = NULL;
      }
 
-   for (i = 0; i < ELEMENTS_COUNT; i++)
+   for (i = 0; i < ELEMENTS_MID_COUNT; i++)
      elm_genlist_item_append(glist, ic, NULL,
                              NULL, type, NULL, NULL);
 
diff --git a/src/bin/ui/live_view/elementary/live_list.c 
b/src/bin/ui/live_view/elementary/live_list.c
index df0c255..155c7ad 100644
--- a/src/bin/ui/live_view/elementary/live_list.c
+++ b/src/bin/ui/live_view/elementary/live_list.c
@@ -121,7 +121,7 @@ widget_list_create(Evas_Object *parent, const Group *group)
    int i = 0;
    Evas_Object *object = elm_list_add(parent);
 
-   for (i = 0; i < ELEMENTS_COUNT; i++)
+   for (i = 0; i < ELEMENTS_BIG_COUNT; i++)
      elm_list_item_append(object, _("No icons"), NULL, NULL, NULL, NULL);
 
    if (strstr(group->class, "h_") == group->class)
diff --git a/src/bin/ui/live_view/elementary/live_scroller.c 
b/src/bin/ui/live_view/elementary/live_scroller.c
index c89d89e..e009b07 100644
--- a/src/bin/ui/live_view/elementary/live_scroller.c
+++ b/src/bin/ui/live_view/elementary/live_scroller.c
@@ -33,9 +33,9 @@ _on_scroller_swallow_check(void *data,
         content = elm_table_add(object);
         int i, j;
 
-        for (j = 0; j < ELEMENTS_COUNT; j++)
+        for (j = 0; j < ELEMENTS_MID_COUNT; j++)
           {
-             for (i = 0; i < ELEMENTS_COUNT; i++)
+             for (i = 0; i < ELEMENTS_MID_COUNT; i++)
                {
                   bt = object_generate(part, content);
                   if (bt)
diff --git a/src/bin/ui/live_view/live_widgets.h 
b/src/bin/ui/live_view/live_widgets.h
index 6cab121..e042360 100644
--- a/src/bin/ui/live_view/live_widgets.h
+++ b/src/bin/ui/live_view/live_widgets.h
@@ -41,7 +41,9 @@
 
 #define COLOR_BLUE_LIGHT 57, 102, 147, 255
 #define COLOR_BLUE_DARK 58, 92, 126, 255
-#define ELEMENTS_COUNT 16
+#define ELEMENTS_SMALL_COUNT 5
+#define ELEMENTS_MID_COUNT   25
+#define ELEMENTS_BIG_COUNT   100
 
 typedef void (* Swallow_Clean_Func)(const char *, Evas_Object *);
 

-- 


Reply via email to