[gimp/gtk3-port: 121/235] libgimpwidgets: port GimpChainButton to	GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gimp/gtk3-port: 121/235] libgimpwidgets: port GimpChainButton to	GtkStyleContext
- Date: Fri,  7 Oct 2011 11:06:17 +0000 (UTC)
commit 51da46fd20ea37c61af33c93c928a3dc4f0d28c5
Author: Michael Natterer <mitch gimp org>
Date:   Wed Dec 15 13:16:03 2010 +0100
    libgimpwidgets: port GimpChainButton to GtkStyleContext
 libgimpwidgets/gimpchainbutton.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/libgimpwidgets/gimpchainbutton.c b/libgimpwidgets/gimpchainbutton.c
index 6bd5b7f..dd72689 100644
--- a/libgimpwidgets/gimpchainbutton.c
+++ b/libgimpwidgets/gimpchainbutton.c
@@ -368,11 +368,12 @@ static gboolean
 gimp_chain_line_draw (GtkWidget *widget,
                       cairo_t   *cr)
 {
-  GtkStyle          *style = gtk_widget_get_style (widget);
-  GimpChainLine     *line  = ((GimpChainLine *) widget);
+  GtkStyleContext   *context = gtk_widget_get_style_context (widget);
+  GimpChainLine     *line    = ((GimpChainLine *) widget);
   GtkAllocation      allocation;
   GdkPoint           points[3];
   GimpChainPosition  position;
+  GdkRGBA            color;
 
   gtk_widget_get_allocation (widget, &allocation);
 
@@ -444,7 +445,8 @@ gimp_chain_line_draw (GtkWidget *widget,
 
   cairo_set_line_width (cr, 2.0);
   cairo_set_line_cap (cr, CAIRO_LINE_CAP_BUTT);
-  gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
+  gtk_style_context_get_color (context, 0, &color);
+  gdk_cairo_set_source_rgba (cr, &color);
 
   cairo_stroke (cr);
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]