[clutter] clutter-text: Don't move the cursor to the left when at pos 0



commit a20a8071ed835496f26712093f0cfb72aabfd8c8
Author: Neil Roberts <neil linux intel com>
Date:   Tue Mar 8 17:30:04 2011 +0000

    clutter-text: Don't move the cursor to the left when at pos 0
    
    When the cursor is at the leftmost position in the text the drawn
    pixel position is moved to the left by the size of the cursor. There's
    no explanation for why this happens and it doesn't seem to make any
    sense so this patch removes it. It makes multi-line texts looks odd
    because the cursor ends up at a different horizontal position when it
    is on the first line from any other line. It also makes using
    priv->cursor_pos difficult in any other part of the code because the
    paint function modifies it.
    
    The original patch that added this can be traced back to Tidy commit
    c356487c15. There's no explanation in the commit message either.
    
    http://bugzilla.clutter-project.org/show_bug.cgi?id=2599

 clutter/clutter-text.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index ed321ad..9e9a37f 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -1394,9 +1394,6 @@ selection_paint (ClutterText *self)
 
       position = priv->position;
 
-      if (position == 0)
-        priv->cursor_pos.x -= priv->cursor_size;
-
       if (position == priv->selection_bound)
         {
           /* No selection, just draw the cursor */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]