From e162d0b0607e9221b360cfe7b0d61a2b4b44edd9 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Thu, 14 May 2009 10:17:24 +0100 Subject: [PATCH] [text] position the cursor correctly in single line mode The position of the text should be increased by the value of TEXT_PADDING and the cursor offset by the same value as the text offset. --- clutter/clutter-text.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 6b1d693f9..53f249768 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -1354,11 +1354,10 @@ clutter_text_paint (ClutterActor *self) if (priv->position == -1) { text_x = actor_width - text_width; - priv->cursor_pos.x += text_x + TEXT_PADDING; } else if (priv->position == 0) { - text_x = 0; + text_x = TEXT_PADDING; } else { @@ -1375,9 +1374,9 @@ clutter_text_paint (ClutterActor *self) } else { - text_x = 0; - priv->cursor_pos.x += text_x + TEXT_PADDING; + text_x = TEXT_PADDING; } + priv->cursor_pos.x += text_x; } else text_x = 0;