[gimp/gtk3-port: 120/228] app: port GimpColormapEditor to	GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gimp/gtk3-port: 120/228] app: port GimpColormapEditor to	GtkStyleContext
 
- Date: Thu,  8 May 2014 23:59:16 +0000 (UTC)
 
commit 49bcf1b31ecb35f5f9880e4b24697277e497f124
Author: Michael Natterer <mitch gimp org>
Date:   Sun Dec 19 13:13:51 2010 +0100
    app: port GimpColormapEditor to GtkStyleContext
 app/widgets/gimpcolormapeditor.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpcolormapeditor.c b/app/widgets/gimpcolormapeditor.c
index ba498d9..b1f33ea 100644
--- a/app/widgets/gimpcolormapeditor.c
+++ b/app/widgets/gimpcolormapeditor.c
@@ -484,8 +484,9 @@ gimp_colormap_preview_draw (GtkWidget          *widget,
                             GimpColormapEditor *editor)
 {
   GimpImageEditor *image_editor = GIMP_IMAGE_EDITOR (editor);
-  GtkStyle        *style;
+  GtkStyleContext *style        = gtk_widget_get_style_context (widget);
   GtkAllocation    allocation;
+  GdkRGBA          color;
   gint             width, height;
   gint             y;
 
@@ -493,8 +494,9 @@ gimp_colormap_preview_draw (GtkWidget          *widget,
       gimp_image_get_base_type (image_editor->image) == GIMP_INDEXED)
     return FALSE;
 
-  style = gtk_widget_get_style (widget);
-  gdk_cairo_set_source_color (cr, &style->fg[gtk_widget_get_state (widget)]);
+  gtk_style_context_get_color (style, gtk_widget_get_state_flags (widget),
+                               &color);
+  gdk_cairo_set_source_rgba (cr, &color);
 
   gtk_widget_get_allocation (widget, &allocation);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]