aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-12-01 02:36:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-12-01 03:28:35 +0800
commit7c2e05401bfed572a7253d3da24a30306497d570 (patch)
tree5c9f30e506f4ccaf2a13d140426b3be8fe1780ed /calendar/gui
parentb15e0d6df6e3e626a7c8b33fd1d0504fca7ca5b5 (diff)
downloadgsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.tar
gsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.tar.gz
gsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.tar.bz2
gsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.tar.lz
gsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.tar.xz
gsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.tar.zst
gsoc2013-evolution-7c2e05401bfed572a7253d3da24a30306497d570.zip
Avoid GtkStyle-based "paint" functions.
Use GtkStyleContext-based "render" functions instead. gtk_paint_arrow() --> gtk_render_arrow() gtk_paint_box() --> gtk_render_background() gtk_paint_expander() --> gtk_render_expander() gtk_paint_flat_box() --> gtk_render_background() gtk_paint_shadow() --> gtk_render_frame() gtk_paint_vline() --> gtk_render_line()
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-meeting-time-sel.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 44f4f6521a..f3f8b3a846 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -967,17 +967,20 @@ e_meeting_time_selector_draw_key_color (GtkWidget *darea,
{
EMeetingTimeSelector * mts;
GtkAllocation allocation;
- GtkStyle *style;
-
- style = gtk_widget_get_style (darea);
- gtk_widget_get_allocation (darea, &allocation);
+ GtkStyleContext *style_context;
mts = g_object_get_data (G_OBJECT (darea), "data");
- gtk_paint_shadow (
- style, cr, GTK_STATE_NORMAL,
- GTK_SHADOW_IN, NULL, NULL, 0, 0,
- allocation.width, allocation.height);
+ style_context = gtk_widget_get_style_context (darea);
+
+ gtk_widget_get_allocation (darea, &allocation);
+
+ gtk_render_frame (
+ style_context, cr,
+ (gdouble) 0,
+ (gdouble) 0,
+ (gdouble) allocation.width,
+ (gdouble) allocation.height);
if (color) {
gdk_cairo_set_source_color (cr, color);
@@ -1301,23 +1304,21 @@ e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts,
cairo_t *cr)
{
GtkAllocation allocation;
- GtkStyle *style;
- gint x, y, w, h;
+ GtkStyleContext *style_context;
- cairo_save (cr);
+ style_context = gtk_widget_get_style_context (GTK_WIDGET (mts));
/* Draw the shadow around the graphical displays. */
gtk_widget_get_allocation (mts->display_top, &allocation);
- x = allocation.x - 2;
- y = allocation.y - 2;
- w = allocation.width + 4;
- h = allocation.height + allocation.height + 4;
- style = gtk_widget_get_style (GTK_WIDGET (mts));
+ cairo_save (cr);
- gtk_paint_shadow (
- style, cr, GTK_STATE_NORMAL,
- GTK_SHADOW_IN, NULL, NULL, x, y, w, h);
+ gtk_render_frame (
+ style_context, cr,
+ (gdouble) allocation.x - 2,
+ (gdouble) allocation.y - 2,
+ (gdouble) allocation.width + 4,
+ (gdouble) allocation.height + allocation.height + 4);
cairo_restore (cr);
}