Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_text.c
Log Message:
- make ewl_text wrap work correctly
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -3 -r1.115 -r1.116
--- ewl_text.c 6 Sep 2006 17:47:45 -0000 1.115
+++ ewl_text.c 6 Sep 2006 18:39:01 -0000 1.116
@@ -98,7 +98,8 @@
ewl_widget_appearance_set(EWL_WIDGET(t), EWL_TEXT_TYPE);
ewl_widget_inherit(EWL_WIDGET(t), EWL_TEXT_TYPE);
- ewl_object_fill_policy_set(EWL_OBJECT(t), EWL_FLAG_FILL_NONE);
+ ewl_object_fill_policy_set(EWL_OBJECT(t), EWL_FLAG_FILL_HFILL
+ | EWL_FLAG_FILL_VFILL);
/* create the formatting tree before we do any formatting */
t->formatting.tree = ewl_text_tree_new();
@@ -1347,6 +1348,14 @@
change = ewl_text_context_new();
change->wrap = wrap;
+ if (wrap == EWL_TEXT_WRAP_NONE)
+ ewl_object_fill_policy_set(EWL_OBJECT(t), EWL_FLAG_FILL_HFILL
+ |
EWL_FLAG_FILL_VFILL);
+ else
+ ewl_object_fill_policy_set(EWL_OBJECT(t), EWL_FLAG_FILL_HSHRINK
+ |
EWL_FLAG_FILL_HFILL
+ |
EWL_FLAG_FILL_VFILL);
+
ewl_text_tree_context_set(t, EWL_TEXT_CONTEXT_MASK_WRAP, change);
ewl_text_context_release(change);
@@ -2219,7 +2228,7 @@
evas_textblock_cursor_text_append(cursor, "");
ewl_text_tree_walk(t);
- evas_object_textblock_size_native_get(t->textblock, &w, &h);
+ evas_object_textblock_size_formatted_get(t->textblock, &w, &h);
/* Fallback, just in case we hit a corner case */
if (!h) h = 1;
@@ -2575,9 +2584,9 @@
if (t->textblock)
{
evas_object_move(t->textblock, xx + t->offset.x,
- yy + t->offset.y);
+ yy + t->offset.y);
evas_object_resize(t->textblock, ww - t->offset.x,
- hh - t->offset.y);
+ hh - t->offset.y);
if (t->dirty)
ewl_text_display(t);
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs