From 663d6179ffdb27ef25ee67e4b7d2e05a5d1216aa Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 6 Mar 2012 15:05:36 +0000 Subject: [PATCH] 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 --- clutter/clutter-text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index 464b3b898..583be65dd 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -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;