mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[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:
parent
cd86e70f41
commit
e162d0b060
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user