libgimpwidgets: port GimpChainButton to GtkStyleContext

This commit is contained in:
Michael Natterer 2010-12-15 13:16:03 +01:00
parent 97da93d1ac
commit c62075b4c0
1 changed files with 5 additions and 3 deletions

View File

@ -369,11 +369,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);
@ -445,7 +446,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);