From 667e52f552e6dc59944c5d712598d690018c0b78 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 13 Feb 2012 08:50:18 +0000 Subject: [PATCH] From: Hyoyoung Chang Subject: [E-devel] [patch] elm_genlist - bugfix at genlist rotation. It's about genlist items which are backed from rotation. After rotating and items width is extending, genlist doesn't shrink its items. So adding some routines to check if item min width is bigger than genlist's width. If then recalc items width. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67876 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_genlist.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index d5e75be..b3f8bc0 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2390,7 +2390,7 @@ _calc_job(void *data) { Widget_Data *wd = data; Item_Block *itb, *chb = NULL; - Evas_Coord minw = -1, minh = 0, y = 0, ow, dy = 0; + Evas_Coord minw = -1, minh = 0, y = 0, ow, dy = 0, vw; Evas_Coord pan_w = 0, pan_h = 0; int in = 0; Eina_Bool minw_change = EINA_FALSE; @@ -2398,6 +2398,8 @@ _calc_job(void *data) if (!wd) return; evas_object_geometry_get(wd->pan_smart, NULL, NULL, &ow, &wd->h); + elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, NULL); + if (wd->w != ow) wd->w = ow; @@ -2438,6 +2440,11 @@ _calc_job(void *data) minw = itb->minw; minw_change = EINA_TRUE; } + if (minw > vw) + { + minw = vw; + minw_change = EINA_TRUE; + } itb->w = minw; itb->h = itb->minh; y += itb->h; -- 2.7.4