Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_entry.c 


Log Message:
More consistent cursor layout.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- ewl_entry.c 26 Feb 2003 22:35:25 -0000      1.46
+++ ewl_entry.c 27 Feb 2003 04:18:49 -0000      1.47
@@ -169,6 +169,7 @@
         */
        xx = CURRENT_X(w);
        yy = CURRENT_Y(w);
+       hh = CURRENT_H(w);
 
        /*
         * First position the text.
@@ -178,29 +179,28 @@
                        ewl_object_get_preferred_w(EWL_OBJECT(e->text)),
                        ewl_object_get_preferred_h(EWL_OBJECT(e->text)));
 
-       /*
-        * Now position the cursor based on the current position in the text.
-        */
-       c_spos = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
-       ewl_text_get_letter_geometry(EWL_TEXT(e->text), --c_spos, &sx,
-                                    &sy, NULL, NULL);
-
-       c_epos = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
-       ewl_text_get_letter_geometry(EWL_TEXT(e->text), --c_epos, &ex,
-                                    &ey, &ew, &eh);
-
        str = EWL_TEXT(e->text)->text;
+       c_spos = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
 
-       if (str && (l = strlen(str)) && c_spos >= l) {
+       if (str && (l = strlen(str)) && c_spos > l) {
                xx += ewl_object_get_current_w(EWL_OBJECT(e->text));
                ww = 5;
        } else {
-               xx += sx;
+
+               /*
+                * Now position the cursor based on the current position in the
+                * text.
+                */
+               ewl_text_get_letter_geometry(EWL_TEXT(e->text), --c_spos, &sx,
+                                            &sy, NULL, NULL);
+
+               c_epos = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
+               ewl_text_get_letter_geometry(EWL_TEXT(e->text), --c_epos, &ex,
+                                            &ey, &ew, &eh);
+
+               xx = sx;
                ww = (ex + ew) - sx;
        }
-
-       yy += ey;
-       hh = ewl_object_get_current_h(EWL_OBJECT(e->text));
 
        ewl_object_request_geometry(EWL_OBJECT(e->cursor), xx, yy, ww, hh);
 




-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to