[gnome-shell] [StEntry] Make the cursor size stylable
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [StEntry] Make the cursor size stylable
- Date: Sun, 7 Mar 2010 22:36:38 +0000 (UTC)
commit a0b5a44fe9542735864ac3d29d937eb24e7a6319
Author: Florian Müllner <fmuellner src gnome org>
Date: Sat Feb 27 23:19:24 2010 +0100
[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 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/st/st-entry.c b/src/st/st-entry.c
index e474902..1c3e3ae 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]