Enlightenment CVS committal Author : lordchaos Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_iconbox.c ewl_image.c Log Message: * Fix an iconbox sizing regression * Fix constrain tile settings, and constrain properly for images higher than wide =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -3 -r1.58 -r1.59 --- ewl_iconbox.c 29 Oct 2005 06:24:17 -0000 1.58 +++ ewl_iconbox.c 29 Oct 2005 06:55:33 -0000 1.59 @@ -684,7 +684,7 @@ EWL_ICONBOX_ICON(ib)->icon_box_parent = iconbox; /* Set our parent */ - //ewl_object_fill_policy_set(EWL_OBJECT(ib), EWL_FLAG_FILL_FILL); + ewl_object_fill_policy_set(EWL_OBJECT(ib), EWL_FLAG_FILL_FILL); ewl_object_fill_policy_set(EWL_OBJECT(EWL_ICONBOX_ICON(ib)->floater), EWL_FLAG_FILL_SHRINK); ewl_container_child_append(EWL_CONTAINER(EWL_ICONBOX_ICON(ib)->floater), ib); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_image.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- ewl_image.c 29 Oct 2005 06:45:31 -0000 1.17 +++ ewl_image.c 29 Oct 2005 06:55:33 -0000 1.18 @@ -334,12 +334,7 @@ evas_object_image_size_get(i->image, &i->ow, &i->oh); } - /*Constrain settings*/ - if (i->cs && (i->ow > i->cs || i->oh > i->cs)) { - double cp = i->cs / (double)i->ow; - ewl_image_scale(i, cp,cp); - } evas_object_layer_set(i->image, ewl_widget_layer_sum_get(w)); if (w->fx_clip_box) @@ -362,6 +357,19 @@ ewl_image_scale(i, i->sw, i->sh); } + /*Constrain settings*/ + if (i->cs && (i->ow > i->cs || i->oh > i->cs)) { + double cp = 0; + if (i->ow > i->oh) + cp = i->cs / (double)i->ow; + else + cp = i->cs / (double)i->oh; + + ewl_image_scale(i, cp,cp); + ewl_image_tile_set(i,0,0,cp*i->ow,cp*i->oh); + + } + DLEAVE_FUNCTION(DLEVEL_STABLE); } ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs