[gimp/gtk3-port: 206/248] app: port GimpPaletteView to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 206/248] app: port GimpPaletteView to GtkStyleContext
- Date: Fri, 18 Mar 2011 23:18:15 +0000 (UTC)
commit 7c6f03751f6eae86c8e267f9ad24ff1935062dc8
Author: Michael Natterer <mitch gimp org>
Date: Mon Jan 3 14:30:43 2011 +0100
app: port GimpPaletteView to GtkStyleContext
app/widgets/gimppaletteview.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimppaletteview.c b/app/widgets/gimppaletteview.c
index 3296764..0d9cc37 100644
--- a/app/widgets/gimppaletteview.c
+++ b/app/widgets/gimppaletteview.c
@@ -172,8 +172,9 @@ gimp_palette_view_draw (GtkWidget *widget,
if (view->renderer->viewable && pal_view->selected)
{
GimpViewRendererPalette *renderer;
- GtkStyle *style = gtk_widget_get_style (widget);
+ GtkStyleContext *style = gtk_widget_get_style_context (widget);
GtkAllocation allocation;
+ GdkRGBA color;
gint row, col;
renderer = GIMP_VIEW_RENDERER_PALETTE (view->renderer);
@@ -190,12 +191,14 @@ gimp_palette_view_draw (GtkWidget *widget,
renderer->cell_height);
cairo_set_line_width (cr, 1.0);
- gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_SELECTED]);
+ gtk_style_context_get_color (style, GTK_STATE_FLAG_SELECTED, &color);
+ gdk_cairo_set_source_rgba (cr, &color);
cairo_stroke_preserve (cr);
if (gimp_cairo_set_focus_line_pattern (cr, widget))
{
- gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
+ gtk_style_context_get_color (style, 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]