[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.
This commit is contained in:
Thomas Wood 2009-05-14 10:17:24 +01:00
parent cd86e70f41
commit e162d0b060

View File

@ -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;