text: Center the cursor caret

We remove 2 pixels from the height of the cursor, but we should also
remove the same amount from the position on the y axis, so that the
cursor caret appears centered in the allocated height.

https://bugzilla.gnome.org/show_bug.cgi?id=655491
This commit is contained in:
Emmanuele Bassi 2012-03-06 15:05:36 +00:00
parent 812fbee7ec
commit 663d6179ff

View File

@ -990,9 +990,9 @@ clutter_text_ensure_cursor_position (ClutterText *self)
&cursor_height);
cursor_pos.x = x;
cursor_pos.y = y;
cursor_pos.y = y + 2;
cursor_pos.width = priv->cursor_size;
cursor_pos.height = cursor_height - 2;
cursor_pos.height = cursor_height - 4;
x_changed = priv->cursor_pos.x != cursor_pos.x;
y_changed = priv->cursor_pos.y != cursor_pos.y;