summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-11-27 23:31:10 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-11-27 23:31:10 +0000
commit083e48b0f1e09b0f9056c6cda5a6f344a457583b (patch)
tree03521f8104cbe3e849ba6165901ffbafaa2777ca /src/ui/widget
parentGerman translation 100% (diff)
downloadinkscape-083e48b0f1e09b0f9056c6cda5a6f344a457583b.tar.gz
inkscape-083e48b0f1e09b0f9056c6cda5a6f344a457583b.zip
GTK+ 3: Migrate to GdkRGBA
(bzr r11910)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/gimpspinscale.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/ui/widget/gimpspinscale.c b/src/ui/widget/gimpspinscale.c
index 222a8aa1d..f9f9a3807 100644
--- a/src/ui/widget/gimpspinscale.c
+++ b/src/ui/widget/gimpspinscale.c
@@ -408,21 +408,20 @@ static gboolean
gimp_spin_scale_expose (GtkWidget *widget, GdkEventExpose *event)
#endif
{
- GimpSpinScalePrivate *private = GET_PRIVATE (widget);
- GtkStyle *style = gtk_widget_get_style (widget);
-
+ GimpSpinScalePrivate *private = GET_PRIVATE (widget);
#if WITH_GTKMM_3_0
+ GtkStyleContext *style = gtk_widget_get_style_context(widget);
GtkAllocation allocation;
+ GdkRGBA color;
cairo_save (cr);
GTK_WIDGET_CLASS (parent_class)->draw (widget, cr);
cairo_restore (cr);
gtk_widget_get_allocation (widget, &allocation);
-
-
#else
+ GtkStyle *style = gtk_widget_get_style (widget);
cairo_t *cr;
gint w;
@@ -499,12 +498,17 @@ static gboolean
#if WITH_GTKMM_3_0
cairo_move_to (cr, layout_offset_x, text_area.y + layout_offset_y-3);
+
+ gtk_style_context_get_color (style, gtk_widget_get_state_flags (widget),
+ &color);
+
+ gdk_cairo_set_source_rgba (cr, &color);
#else
cairo_move_to (cr, layout_offset_x, layout_offset_y-3);
-#endif
-
+
gdk_cairo_set_source_color (cr,
&style->text[gtk_widget_get_state (widget)]);
+#endif
pango_cairo_show_layout (cr, private->layout);
}