Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_text.c 


Log Message:
Add blank text to account for sizing on an empty textblock, this works after
rasters evas fix.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- ewl_text.c  28 Oct 2005 02:28:00 -0000      1.35
+++ ewl_text.c  28 Oct 2005 03:19:33 -0000      1.36
@@ -4199,26 +4199,20 @@
 ewl_text_display(Ewl_Text *t)
 {
        Evas_Coord w = 0, h = 0;
+       Evas_Textblock_Cursor *cursor;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("t", t);
        DCHECK_TYPE("t", t, "text");
 
        evas_object_textblock2_clear(t->textblock);
+       cursor = (Evas_Textblock_Cursor 
*)evas_object_textblock2_cursor_get(t->textblock);
+       evas_textblock2_cursor_text_append(cursor, "");
        ewl_text_btree_walk(t);
        evas_object_textblock2_size_native_get(t->textblock, &w, &h);
 
-       /* if we don't get a height back try to set the height to the height of
-       * the font, if we don't have a font size, make it 1 */
-       if (!h) 
-       {
-               Evas_Textblock_Cursor *cursor;
-
-               cursor = (Evas_Textblock_Cursor 
*)evas_object_textblock2_cursor_get(t->textblock);
-               evas_textblock2_cursor_text_append(cursor, " ");
-               evas_object_textblock2_size_native_get(t->textblock, &w, &h);
-               if (!h) h = 1;
-       }
+       /* Fallback, just in case we hit a corner case */
+       if (!h) h = 1;
 
        ewl_object_preferred_inner_size_set(EWL_OBJECT(t), (int)w, (int)h);
        ewl_widget_configure(EWL_WIDGET(t));




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to