summaryrefslogtreecommitdiff
path: root/gtk/gtkeventbox.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2010-12-28 17:39:08 +0100
committerCarlos Garnacho <carlosg@gnome.org>2010-12-28 19:25:47 +0100
commit53a4feadf03ddf461401b22d8fcb3d5e96f3e8ec (patch)
treeb9eb11199c76ce4a4538f59205666066a07f38dd /gtk/gtkeventbox.c
parent06462b98a0f4faf3f427d65bfacff3e389669f7c (diff)
downloadgtk+-53a4feadf03ddf461401b22d8fcb3d5e96f3e8ec.tar.gz
Make GtkEventBox use GtkStyleContext.
Diffstat (limited to 'gtk/gtkeventbox.c')
-rw-r--r--gtk/gtkeventbox.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index 5514e11b3e..1ba582b19b 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -435,10 +435,8 @@ gtk_event_box_realize (GtkWidget *widget)
gdk_window_set_user_data (priv->event_window, widget);
}
- gtk_widget_style_attach (widget);
-
if (visible_window)
- gtk_style_set_background (gtk_widget_get_style (widget), window, GTK_STATE_NORMAL);
+ gtk_style_context_set_background (gtk_widget_get_style_context (widget), window);
}
static void
@@ -581,14 +579,14 @@ gtk_event_box_draw (GtkWidget *widget,
{
if (gtk_widget_get_has_window (widget) &&
!gtk_widget_get_app_paintable (widget))
- gtk_paint_flat_box (gtk_widget_get_style (widget),
- cr,
- gtk_widget_get_state (widget),
- GTK_SHADOW_NONE,
- widget, "eventbox",
- 0, 0,
- gtk_widget_get_allocated_width (widget),
- gtk_widget_get_allocated_height (widget));
+ {
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_render_background (context, cr, 0, 0,
+ gtk_widget_get_allocated_width (widget),
+ gtk_widget_get_allocated_height (widget));
+ }
GTK_WIDGET_CLASS (gtk_event_box_parent_class)->draw (widget, cr);