discomfitor pushed a commit to branch elementary-1.17.

http://git.enlightenment.org/core/elementary.git/commit/?id=616cc866f2b846d5626e6d99ab9ca3b2a8dcd7af

commit 616cc866f2b846d5626e6d99ab9ca3b2a8dcd7af
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Feb 26 12:43:38 2016 -0500

    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
---
 src/lib/elm_list.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index c41d501..e14f86e 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -818,6 +818,7 @@ _items_fix(Evas_Object *obj)
    const char *it_plain;
    const char *it_compress;
    const char *it_compress_odd;
+   Eina_Bool separators = EINA_FALSE;
 
    ELM_LIST_DATA_GET(obj, sd);
 
@@ -853,6 +854,7 @@ _items_fix(Evas_Object *obj)
              if (mw > minw[1]) minw[1] = mw;
              if (mh > minh[1]) minh[1] = mh;
           }
+        separators |= it->is_separator;
      }
 
    if ((minw[0] != sd->minw[0]) || (minw[1] != sd->minw[1]) ||
@@ -866,6 +868,7 @@ _items_fix(Evas_Object *obj)
      }
 
    i = 0;
+   elm_box_homogeneous_set(sd->box, !separators);
    EINA_LIST_FOREACH(sd->items, l, eo_it)
      {
         ELM_LIST_ITEM_DATA_GET(eo_it, it);

-- 


Reply via email to