Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_entry.c 


Log Message:
EWL has automatic entry scrolling when typing.... again.
Need to add the mouse selection behavior.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_entry.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ewl_entry.c 15 Mar 2006 04:03:48 -0000      1.51
+++ ewl_entry.c 18 Apr 2006 23:21:46 -0000      1.52
@@ -233,6 +233,7 @@
        Ewl_Entry *e;
        unsigned int c_pos;
        int cx = 0, cy = 0, cw = 0, ch = 0;
+       int ox = 0, oy = 0;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -249,6 +250,16 @@
 
        if (!cw) cw = CURRENT_W(e->cursor);
        if (!ch) ch = CURRENT_H(e->cursor);
+
+       ox = (cx + cw) - (CURRENT_X(e) + CURRENT_W(e));
+       oy = (cy + ch) - (CURRENT_Y(e) + CURRENT_H(e));
+
+       if (ox < 0)
+               ox = 0;
+       if (oy < 0)
+               oy = 0;
+
+       ewl_text_offsets_set(EWL_TEXT(e), -ox, -oy);
 
        ewl_object_geometry_request(EWL_OBJECT(e->cursor), cx, cy, cw, ch);
 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to