Enlightenment CVS committal Author : tsauerbeck Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/lib Modified Files: edje_text.c Log Message: fixed text fitting on both the x and the y axis =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_text.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- edje_text.c 20 Mar 2005 16:49:10 -0000 1.34 +++ edje_text.c 20 Mar 2005 22:16:24 -0000 1.35 @@ -634,14 +634,23 @@ } if (chosen_desc->text.fit_y) { - size = sh; + /* if we fit in the x axis, too, size already has a somewhat + * meaningful value, so don't overwrite it with the starting + * value in that case + */ + if (!chosen_desc->text.fit_x) size = sh; + if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path); else evas_object_text_font_source_set(ep->object, NULL); evas_object_text_font_set(ep->object, font, size); evas_object_text_text_set(ep->object, text); evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th); - if (th < sh) + + /* only grow the font size if we didn't already reach the max size + * for the x axis + */ + if (!chosen_desc->text.fit_x && th < sh) { int dif; ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs