[giggle] src/giggle-diff-view.c: Port to GtkStyleContext
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [giggle] src/giggle-diff-view.c: Port to GtkStyleContext
- Date: Sat, 26 Feb 2011 03:43:46 +0000 (UTC)
commit e28f6628c07e769b3de4a15f5c6c31d260333564
Author: Javier Jardón <jjardon gnome org>
Date: Sat Feb 26 03:35:42 2011 +0000
src/giggle-diff-view.c: Port to GtkStyleContext
src/giggle-diff-view.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/giggle-diff-view.c b/src/giggle-diff-view.c
index d6a3b20..562aa5a 100644
--- a/src/giggle-diff-view.c
+++ b/src/giggle-diff-view.c
@@ -285,8 +285,11 @@ static void
diff_view_style_updated (GtkWidget *widget)
{
GiggleDiffViewPriv *priv = GET_PRIV (widget);
+ GtkStyleContext *context;
static const GdkColor red = { 0, 0xffff, 0, 0 };
GdkColor *error_color;
+ GdkColor color;
+ GdkRGBA rgba;
GTK_WIDGET_CLASS (giggle_diff_view_parent_class)->style_updated (widget);
@@ -295,8 +298,15 @@ diff_view_style_updated (GtkWidget *widget)
if (!error_color)
error_color = gdk_color_copy (&red);
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
+
+ color.red = rgba.red * 65535;
+ color.green = rgba.green * 65535;
+ color.blue = rgba.blue * 65535;
+
g_object_set (priv->invalid_char,
- "foreground-gdk", >k_widget_get_style (widget)->base[GTK_STATE_NORMAL],
+ "foreground-gdk", &color,
"background-gdk", error_color,
"style", PANGO_STYLE_ITALIC,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]