summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSangHyeon Lee <sh10233.lee@samsung.com>2016-01-22 16:55:37 +0900
committerSangHyeon Lee <sh10233.lee@samsung.com>2016-01-22 16:55:41 +0900
commita575db8c64eea4553c4e719b95de2eccb29d239c (patch)
tree1055db2f511de09857895cf6c05ad8484e5976b2 /src
parentdc6e42cf11d766fec1c4c91adfc700d63cdf2723 (diff)
genlist : fix tree item floating issue when homoegeneous mode is enabled
genlist item is flaoting upon the expanded item when homoegeneous mode is enabled. when item block is recalculated by tree expanding, new item didn't update their properties and values becuase of size hash, but edc actaully need to be recaculated after swallowing tree size padding. solve the issue by adding expand depth check in size hash. you can check the previous issue in T2708 elementary_test->genlist tree->homoegeneous check @fix
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_genlist.c7
-rw-r--r--src/lib/elm_widget_genlist.h7
2 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index b78081f84..de720cf1b 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -1829,6 +1829,7 @@ _item_realize(Elm_Gen_Item *it,
1829 { 1829 {
1830 GL_IT(it)->w = GL_IT(it)->minw = size->minw; 1830 GL_IT(it)->w = GL_IT(it)->minw = size->minw;
1831 GL_IT(it)->h = GL_IT(it)->minh = size->minh; 1831 GL_IT(it)->h = GL_IT(it)->minh = size->minh;
1832 size->expanded_depth = it->item->expanded_depth;
1832 it->item->mincalcd = EINA_TRUE; 1833 it->item->mincalcd = EINA_TRUE;
1833 } 1834 }
1834 else 1835 else
@@ -1880,6 +1881,7 @@ _item_realize(Elm_Gen_Item *it,
1880 1881
1881 size = ELM_NEW(Item_Size); 1882 size = ELM_NEW(Item_Size);
1882 size->itc = it->itc; 1883 size->itc = it->itc;
1884 size->expanded_depth = it->item->expanded_depth;
1883 size->minw = mw; 1885 size->minw = mw;
1884 size->minh = mh; 1886 size->minh = mh;
1885 eina_hash_add(sd->size_caches, &(it->itc), size); 1887 eina_hash_add(sd->size_caches, &(it->itc), size);
@@ -5099,7 +5101,7 @@ _item_block_recalc(Item_Block *itb,
5099 if (!it->item->mincalcd) changed = EINA_TRUE; 5101 if (!it->item->mincalcd) changed = EINA_TRUE;
5100 if (changed) 5102 if (changed)
5101 { 5103 {
5102 if (!size) 5104 if (!size || (it->item->expanded_depth != size->expanded_depth))
5103 { 5105 {
5104 _item_realize(it, in, EINA_TRUE); 5106 _item_realize(it, in, EINA_TRUE);
5105 _elm_genlist_item_unrealize(it, EINA_TRUE); 5107 _elm_genlist_item_unrealize(it, EINA_TRUE);
@@ -5115,6 +5117,7 @@ _item_block_recalc(Item_Block *itb,
5115 else 5117 else
5116 { 5118 {
5117 if ((itb->sd->homogeneous) && size && 5119 if ((itb->sd->homogeneous) && size &&
5120 (it->item->expanded_depth == size->expanded_depth) &&
5118 (itb->sd->mode == ELM_LIST_COMPRESS)) 5121 (itb->sd->mode == ELM_LIST_COMPRESS))
5119 { 5122 {
5120 it->item->w = it->item->minw = size->minw; 5123 it->item->w = it->item->minw = size->minw;
@@ -5155,7 +5158,7 @@ _update_job(void *data)
5155 Eina_Bool position = EINA_FALSE, recalc = EINA_FALSE; 5158 Eina_Bool position = EINA_FALSE, recalc = EINA_FALSE;
5156 ELM_GENLIST_DATA_GET(data, sd); 5159 ELM_GENLIST_DATA_GET(data, sd);
5157 Item_Block *itb; 5160 Item_Block *itb;
5158 Eina_List *l2; 5161 Eina_List *l2;
5159 int num, num0; 5162 int num, num0;
5160 5163
5161 sd->update_job = NULL; 5164 sd->update_job = NULL;
diff --git a/src/lib/elm_widget_genlist.h b/src/lib/elm_widget_genlist.h
index 71f613cf1..27f9271b9 100644
--- a/src/lib/elm_widget_genlist.h
+++ b/src/lib/elm_widget_genlist.h
@@ -281,9 +281,10 @@ struct _Item_Cache
281 281
282struct _Item_Size 282struct _Item_Size
283{ 283{
284 const Elm_Genlist_Item_Class *itc; 284 const Elm_Genlist_Item_Class *itc;
285 Evas_Coord minw; 285 Evas_Coord minw;
286 Evas_Coord minh; 286 Evas_Coord minh;
287 int expanded_depth;
287}; 288};
288 289
289typedef struct _Elm_Genlist_Pan_Data Elm_Genlist_Pan_Data; 290typedef struct _Elm_Genlist_Pan_Data Elm_Genlist_Pan_Data;