简体   繁体   中英

How to change the size of List element in EFL

I was trying to change the size of the list element which are added in elementary list function ( elm_list_add ) using append or prepend functions that calls _item_new internally in elm_list.c .

I want to change the size of list element with the icon/image I add. The list should resize according to every icon added not according to the largest icon/image added. I have also unset elm_box_homogeneous_set(priv->box, EINA_FALSE) in elm_list.c which was originally EINA_TRUE. Or should I need to make changes in edc file list.edc.

How Can I resize the List element according to image added in EFL?

Do you want to resize each list item according to its icon/image size? Thus make item sizes different.

First of all, which version of elementary do you use? Secondly, are you sure you want to modify elementary library by yourself?

Well, if you modify elementary list, you can achieve it. In _item_new function , set VIEW(it)'s horizontal align to 0.0 .

evas_object_size_hint_align_set(VIEW(it), 0.0, EVAS_HINT_FILL);

Once the homogeneous mode is set to true, your list should resize according to the content size. So it depends on the style. In worst case, you can write your own item style for the list and incorporate it while appending items. Currently, EFL provides Genlist which is stronger than basic list widget

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM