Enlightenment CVS committal Author : lordchaos Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_iconbox.c Log Message: Visual fix for auto-arrange =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ewl_iconbox.c 21 Jul 2005 04:01:42 -0000 1.8 +++ ewl_iconbox.c 22 Jul 2005 11:53:52 -0000 1.9 @@ -318,14 +318,20 @@ ewl_object_current_size_get(EWL_OBJECT(ib->ewl_iconbox_pane_inner), &sw,&sh); /*printf(" Ewl_IconBox -> We have %d*%d to work with\n", sw,sh);*/ + /*Hack for now - get the biggest icon in the list - this is inefficient*/ + ecore_list_goto_first(ib->ewl_iconbox_icon_list); - while((list_item = (Ewl_IconBox_Icon*)ecore_list_next(ib->ewl_iconbox_icon_list)) != NULL) { - if (iw == 0 || ih == 0) { - iw= ewl_object_preferred_w_get(EWL_OBJECT(list_item)); - ih= ewl_object_preferred_h_get(EWL_OBJECT(list_item)); - } + int nw,nh; + + nw= ewl_object_preferred_w_get(EWL_OBJECT(list_item->image)); + nh= ewl_object_preferred_h_get(EWL_OBJECT(list_item->image)); + if (nw > iw) iw = nw; + if (nh > ih) ih = nh; + } + ecore_list_goto_first(ib->ewl_iconbox_icon_list); + while((list_item = (Ewl_IconBox_Icon*)ecore_list_next(ib->ewl_iconbox_icon_list)) != NULL) { if (iw < EWL_ICONBOX_MOVE_TOLERANCE) { iw = EWL_ICONBOX_MINIMUM_SIZE; ih = EWL_ICONBOX_MINIMUM_SIZE; ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs