- /* FIXME: GtkProgressBar draws the box with "trough" detail,
- * but some engines don't paint anything with that detail for
- * non-GtkProgressBar widgets.
- */
- gtk_paint_box (style,
- cr,
- GTK_STATE_NORMAL, GTK_SHADOW_IN,
- widget, NULL,
- x, y, w, h);
+ gtk_style_context_save (context);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_TROUGH);
+
+ gtk_render_background (context, cr, x, y, w, h);
+ gtk_render_frame (context, cr, x, y, w, h);
+
+ gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border);
+ gtk_style_context_get_padding (context, GTK_STATE_FLAG_NORMAL, &padding);
+
+ x += border.left + padding.left;
+ y += border.top + padding.top;
+ w -= border.left + border.right + padding.left + padding.right;
+ h -= border.top + border.bottom + padding.top + padding.bottom;
+
+ gtk_style_context_restore (context);