Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas Modified Files: evas_object_text.c Log Message: fix sizing problem when u set style after setting text/font =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_text.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- evas_object_text.c 2 May 2006 07:28:47 -0000 1.57 +++ evas_object_text.c 25 May 2006 02:40:09 -0000 1.58 @@ -629,6 +629,7 @@ evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style) { Evas_Object_Text *o; + int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0; MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; @@ -639,7 +640,14 @@ MAGIC_CHECK_END(); if (o->cur.style == style) return; + evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb); o->cur.style = style; + evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b); + if (o->cur.text) + obj->cur.geometry.w += (l - pl) + (r - pr); + else + obj->cur.geometry.w = 0; + obj->cur.geometry.h += (t - pt) + (b - pb); evas_object_change(obj); } @@ -1249,7 +1257,7 @@ if (sr < 4) sr = 4; if (sb < 4) sb = 4; } - + if (l) *l = sl; if (r) *r = sr; if (t) *t = st; @@ -1395,7 +1403,6 @@ obj->cur.geometry.w, \ obj->cur.geometry.h, \ o->cur.text); - /* shadows */ if (o->cur.style == EVAS_TEXT_STYLE_SHADOW) { ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs