[gtk+] Make GtkColorButton use GtkStyleContext
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make GtkColorButton use GtkStyleContext
- Date: Mon, 10 Jan 2011 02:53:07 +0000 (UTC)
commit 455c31d815547fce9fce509001ef7419063d4aa0
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 10 02:30:25 2011 +0100
Make GtkColorButton use GtkStyleContext
gtk/gtkcolorbutton.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 91e1427..3fd11cb 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -324,7 +324,13 @@ gtk_color_button_draw_cb (GtkWidget *widget,
if (!gtk_widget_is_sensitive (GTK_WIDGET (color_button)))
{
- gdk_cairo_set_source_color (cr, >k_widget_get_style (GTK_WIDGET(color_button))->bg[GTK_STATE_INSENSITIVE]);
+ GtkStyleContext *context;
+ GdkRGBA color;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_get_background_color (context, GTK_STATE_FLAG_INSENSITIVE, &color);
+
+ gdk_cairo_set_source_rgba (cr, &color);
checkered = gtk_color_button_get_checkered ();
cairo_mask (cr, checkered);
cairo_pattern_destroy (checkered);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]