patch from tasn: rtl fit.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 22 Nov 2009 01:49:44 +0000 (01:49 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 22 Nov 2009 01:49:44 +0000 (01:49 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@43886 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_text.c

index 003a45a..e33cbc8 100644 (file)
@@ -135,13 +135,13 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
    if (tw > sw)
      {
        if (params->type.text.elipsis != 0.0)
-         c1 = evas_object_text_char_coords_get(ep->object,
-               -p + l, th / 2,
-               NULL, NULL, NULL, NULL);
+          /* should be the last in text! not the rightmost */
+          c1 = evas_object_text_last_up_to_pos(ep->object,
+                -p + l, th / 2);
        if (params->type.text.elipsis != 1.0)
-         c2 = evas_object_text_char_coords_get(ep->object,
-               -p + sw - r, th / 2,
-               NULL, NULL, NULL, NULL);
+          /* should be the last in text! not the rightmost */
+          c2 = evas_object_text_last_up_to_pos(ep->object,
+                -p + sw - r, th / 2);
        if ((c1 < 0) && (c2 < 0))
          {
             c1 = 0;