From a0b5a44fe9542735864ac3d29d937eb24e7a6319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 27 Feb 2010 23:19:24 +0100 Subject: [PATCH] [StEntry] Make the cursor size stylable Just as the cursor color can be styled using the "caret-color" property, expose the cursor size as "caret-size". https://bugzilla.gnome.org/show_bug.cgi?id=611095 --- src/st/st-entry.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/st/st-entry.c b/src/st/st-entry.c index e4749028e..1c3e3ae12 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -184,12 +184,16 @@ st_entry_style_changed (StWidget *self) ClutterColor color; const PangoFontDescription *font; gchar *font_string; + gdouble size; theme_node = st_widget_get_theme_node (self); st_theme_node_get_foreground_color (theme_node, &color); clutter_text_set_color (CLUTTER_TEXT (priv->entry), &color); + if (st_theme_node_get_length (theme_node, "caret-size", FALSE, &size)) + clutter_text_set_cursor_size (CLUTTER_TEXT (priv->entry), (int)(.5 + size)); + if (st_theme_node_get_color (theme_node, "caret-color", FALSE, &color)) clutter_text_set_cursor_color (CLUTTER_TEXT (priv->entry), &color);