aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 44ac2b887..af7e77132 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1162,7 +1162,7 @@ _ephy_web_view_draw_statusbar (GtkWidget *widget, cairo_t *cr)
guint border_width, statusbar_border_width;
PangoLayout *layout;
GtkAllocation allocation;
- GtkStyle *style;
+ GtkStyleContext *context;
EphyWebViewPrivate *priv;
priv = EPHY_WEB_VIEW (widget)->priv;
@@ -1177,8 +1177,6 @@ _ephy_web_view_draw_statusbar (GtkWidget *widget, cairo_t *cr)
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
- style = gtk_widget_get_style (widget);
-
statusbar_border_width = 4; /* FIXME: what should we use here? */
priv->text_rectangle.x = border_width;
@@ -1186,20 +1184,28 @@ _ephy_web_view_draw_statusbar (GtkWidget *widget, cairo_t *cr)
priv->text_rectangle.width = width + (statusbar_border_width * 2);
priv->text_rectangle.height = height + (statusbar_border_width * 2);
- gtk_paint_box (style, cr,
- GTK_STATE_NORMAL, GTK_SHADOW_IN,
- widget, NULL,
- priv->text_rectangle.x,
- priv->text_rectangle.y,
- priv->text_rectangle.width,
- priv->text_rectangle.height);
-
- gtk_paint_layout (style, cr,
- GTK_STATE_NORMAL, FALSE,
- widget, NULL,
- priv->text_rectangle.x + statusbar_border_width,
- priv->text_rectangle.y + statusbar_border_width,
- layout);
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_save (context);
+
+ gtk_style_context_set_state (context, GTK_STATE_FLAG_ACTIVE);
+ gtk_render_background (context, cr,
+ priv->text_rectangle.x,
+ priv->text_rectangle.y,
+ priv->text_rectangle.width,
+ priv->text_rectangle.height);
+ gtk_render_frame (context, cr,
+ priv->text_rectangle.x,
+ priv->text_rectangle.y,
+ priv->text_rectangle.width,
+ priv->text_rectangle.height);
+
+ gtk_style_context_set_state (context, 0);
+ gtk_render_layout (context, cr,
+ priv->text_rectangle.x + statusbar_border_width,
+ priv->text_rectangle.y + statusbar_border_width,
+ layout);
+
+ gtk_style_context_restore (context);
g_object_unref (layout);
}