[gtk+] Make GtkColorSelection use GtkStyleContext
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Make GtkColorSelection use GtkStyleContext
- Date: Mon, 10 Jan 2011 02:53:12 +0000 (UTC)
commit 27c5cc88f8c62f7287d8e3f4078b3adbb2ef7a01
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 10 02:31:23 2011 +0100
Make GtkColorSelection use GtkStyleContext
gtk/gtkcolorsel.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index b817f2e..f60d1e7 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -1112,11 +1112,15 @@ palette_draw (GtkWidget *drawing_area,
cairo_t *cr,
gpointer data)
{
+ GtkStyleContext *context;
gint focus_width;
+ GdkRGBA color;
- gdk_cairo_set_source_color (cr, >k_widget_get_style (drawing_area)->bg[GTK_STATE_NORMAL]);
+ context = gtk_widget_get_style_context (drawing_area);
+ gtk_style_context_get_background_color (context, 0, &color);
+ gdk_cairo_set_source_rgba (cr, &color);
cairo_paint (cr);
-
+
if (gtk_widget_has_focus (drawing_area))
{
set_focus_line_attributes (drawing_area, cr, &focus_width);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]