Evas textblock: Add ellipsis handling for format items.
authorTom Hacohen <tom@stosb.com>
Sun, 6 Nov 2011 12:56:10 +0000 (12:56 +0000)
committerTom Hacohen <tom@stosb.com>
Sun, 6 Nov 2011 12:56:10 +0000 (12:56 +0000)
Just cut before them.

SVN revision: 64817

legacy/evas/src/lib/canvas/evas_object_textblock.c

index b6cd08a..6f2bb2e 100644 (file)
@@ -3447,6 +3447,7 @@ _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
    save_cx = c->x;
    c->w -= ellip_ti->parent.w;
 
+   if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
      {
         Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
 
@@ -3460,6 +3461,11 @@ _layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
              last_it = _ITEM(EINA_INLIST_GET(c->ln->items)->last);
           }
      }
+   else if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
+     {
+        /* We don't want to add this format item. */
+        last_it = NULL;
+     }
 
    c->x = save_cx;
    c->w += ellip_ti->parent.w;