Enlightenment CVS committal Author : englebass Project : e17 Module : libs/edje
Dir : e17/libs/edje/src/lib Modified Files: edje_text.c Log Message: Remove padding when searching for character position. =================================================================== RCS file: /cvs/e/e17/libs/edje/src/lib/edje_text.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -3 -r1.61 -r1.62 --- edje_text.c 26 May 2007 23:57:21 -0000 1.61 +++ edje_text.c 18 Jun 2007 16:48:43 -0000 1.62 @@ -156,6 +156,7 @@ Evas_Coord sw, int *free_text) { Evas_Coord tw = 0, th = 0, p; + int l, r; char *buf; int c1 = -1, c2 = -1, loop = 0, extra; size_t orig_len; @@ -166,6 +167,7 @@ evas_object_text_text_set(ep->object, text); part_get_geometry(ep, &tw, &th); + evas_object_text_style_pad_get(ep->object, &l, &r, NULL, NULL); p = ((sw - tw) * params->text.elipsis); @@ -174,12 +176,12 @@ { if (params->text.elipsis != 0.0) c1 = evas_object_text_char_coords_get(ep->object, - -p, th / 2, + -p + l, th / 2, NULL, NULL, NULL, NULL); if (params->text.elipsis != 1.0) c2 = evas_object_text_char_coords_get(ep->object, - -p + sw, th / 2, - NULL, NULL, NULL, NULL); + -p + sw - r, th / 2, + NULL, NULL, N*ULL, NULL); if ((c1 < 0) && (c2 < 0)) { c1 = 0; @@ -447,7 +449,7 @@ dif = (th - sh) / 4; if (dif < 1) dif = 1; - while ((th > sh) && (sw >= 0.0)) + while ((th > sh) && (sw >= 0)) { size -= dif; if (size <= 0) break; ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs