Guys,The attached patch fix the positioning of gengrid's items when pan_smart size is smaller than viewport size.
Can someone apply it, please? BR. -- Rafael Fonseca ProFUSION embedded systems http://www.profusion.mobi
>From 2d669e31ce34d880492658e9b17412bcc2bd9e18 Mon Sep 17 00:00:00 2001 From: Rafael Fonseca <[email protected]> Date: Mon, 5 Jul 2010 18:05:21 -0300 Subject: [PATCH] Fix gengrid item positioning. The item was being wrongly positioned in the case the pan_smart object size was different from the viewport's. --- src/lib/elm_gengrid.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 9763b01..00e987f 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -577,15 +577,15 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy) item->x = cx; item->y = cy; - evas_object_geometry_get(item->wd->self, &ox, &oy, &vw, &vh); + evas_object_geometry_get(item->wd->pan_smart, &ox, &oy, &vw, &vh); evas_output_viewport_get(evas_object_evas_get(item->wd->self), &cvx, &cvy, &cvw, &cvh); /* Preload rows/columns at each side of the Gengrid */ - cvx -= PRELOAD * item->wd->item_width; - cvy -= PRELOAD * item->wd->item_height; - cvw += 2 * PRELOAD * item->wd->item_width; - cvh += 2 * PRELOAD * item->wd->item_height; + cvx = ox - PRELOAD * item->wd->item_width; + cvy = oy - PRELOAD * item->wd->item_height; + cvw = vw + 2 * PRELOAD * item->wd->item_width; + cvh = vh + 2 * PRELOAD * item->wd->item_height; tch = ((vh/item->wd->item_height)*item->wd->item_height); alignh = (vh - tch)*item->wd->align_y; @@ -605,7 +605,7 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy) alignw = (vw - tcw)*item->wd->align_x; } else if ((item->wd->horizontal) && (item->wd->minw > vw)) - alignw = 0; + alignw = 0; if ((!item->wd->horizontal) && (item->wd->minh < vh)) { int rows; @@ -710,7 +710,7 @@ _calc_job(void *data) Evas_Coord minw = 0, minh = 0, nmax = 0, cvw, cvh; int count; - evas_object_geometry_get(wd->self, NULL, NULL, &cvw, &cvh); + evas_object_geometry_get(wd->pan_smart, NULL, NULL, &cvw, &cvh); if ((wd->horizontal) && (wd->item_height)) nmax = cvh / wd->item_height; else if (wd->item_width) -- 1.7.1.1
------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
