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



commit f2f68d50f43955c60cda57b82f5d08b44e07876d
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
    
    (cherry picked from commit 2505f5b0afadd49d8c5d54d8fb1bf57b9f2a6014)

 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 496e464..6201874 100644
--- a/clutter/clutter-text.c
+++ b/clutter/clutter-text.c
@@ -1372,9 +1372,6 @@ cursor_paint (ClutterText *self)
 
       position = priv->position;
 
-      if (position == 0)
-        priv->cursor_pos.x -= priv->cursor_size;
-
       if (position == priv->selection_bound)
         {
           if (priv->cursor_color_set)



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