summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-26 12:43:38 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-26 12:43:38 -0500
commit9f4c43c20dfa36e7a8be18278acf4336c13574d7 (patch)
tree20f5dd6d84081b1f73bec717a24075886e6c5feb
parente7f674b523ee840c3f0dc064fa22a04c74c47c3a (diff)
list: set internal box as homogeneous if no separator items are present
this is a significant performance optimization since all non-separator items should always be sized identically
-rw-r--r--src/lib/elm_list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index c41d50105..e14f86e9e 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -818,6 +818,7 @@ _items_fix(Evas_Object *obj)
818 const char *it_plain; 818 const char *it_plain;
819 const char *it_compress; 819 const char *it_compress;
820 const char *it_compress_odd; 820 const char *it_compress_odd;
821 Eina_Bool separators = EINA_FALSE;
821 822
822 ELM_LIST_DATA_GET(obj, sd); 823 ELM_LIST_DATA_GET(obj, sd);
823 824
@@ -853,6 +854,7 @@ _items_fix(Evas_Object *obj)
853 if (mw > minw[1]) minw[1] = mw; 854 if (mw > minw[1]) minw[1] = mw;
854 if (mh > minh[1]) minh[1] = mh; 855 if (mh > minh[1]) minh[1] = mh;
855 } 856 }
857 separators |= it->is_separator;
856 } 858 }
857 859
858 if ((minw[0] != sd->minw[0]) || (minw[1] != sd->minw[1]) || 860 if ((minw[0] != sd->minw[0]) || (minw[1] != sd->minw[1]) ||
@@ -866,6 +868,7 @@ _items_fix(Evas_Object *obj)
866 } 868 }
867 869
868 i = 0; 870 i = 0;
871 elm_box_homogeneous_set(sd->box, !separators);
869 EINA_LIST_FOREACH(sd->items, l, eo_it) 872 EINA_LIST_FOREACH(sd->items, l, eo_it)
870 { 873 {
871 ELM_LIST_ITEM_DATA_GET(eo_it, it); 874 ELM_LIST_ITEM_DATA_GET(eo_it, it);