Make GtkColorButton use GtkStyleContext

This commit is contained in:
Carlos Garnacho 2011-01-10 02:30:25 +01:00
parent e0e36b621f
commit 455c31d815

View File

@ -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, &gtk_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);