[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
This commit is contained in:
Florian Müllner 2010-02-27 23:19:24 +01:00
parent 5ce1e3fe92
commit a0b5a44fe9

View File

@ -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);