[clutter] text: Center the cursor caret
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] text: Center the cursor caret
- Date: Tue, 6 Mar 2012 15:10:14 +0000 (UTC)
commit 663d6179ffdb27ef25ee67e4b7d2e05a5d1216aa
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Mar 6 15:05:36 2012 +0000
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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c
index 464b3b8..583be65 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]