summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-09-20 16:38:38 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:11:44 +0200
commit7125712299040884b582e4cc74b1f413d8570feb (patch)
treeb34f23a7dc4a5aaa722303e509dc272fe2e28b8b /gtk/gtkcalendar.c
parentc5d309e596d7eb164c51223a0a61add21bf065b2 (diff)
downloadgtk+-7125712299040884b582e4cc74b1f413d8570feb.tar.gz
calendar: Get rid of gdk_drawable_get_size() usage
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index c8e95decad..08f26f76ee 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2878,7 +2878,6 @@ calendar_paint_arrow (GtkCalendar *calendar,
if (window)
{
GtkStyle *style;
- gint width, height;
gint state;
style = gtk_widget_get_style (widget);
@@ -2887,17 +2886,20 @@ calendar_paint_arrow (GtkCalendar *calendar,
gdk_cairo_set_source_color (cr, &style->bg[state]);
cairo_paint (cr);
- gdk_drawable_get_size (window, &width, &height);
if (arrow == ARROW_MONTH_LEFT || arrow == ARROW_YEAR_LEFT)
gtk_paint_arrow (style, cr, state,
GTK_SHADOW_OUT, widget, "calendar",
GTK_ARROW_LEFT, TRUE,
- width/2 - 3, height/2 - 4, 8, 8);
+ gdk_window_get_width (window) / 2 - 3,
+ gdk_window_get_height (window) / 2 - 4,
+ 8, 8);
else
gtk_paint_arrow (style, cr, state,
GTK_SHADOW_OUT, widget, "calendar",
GTK_ARROW_RIGHT, TRUE,
- width/2 - 4, height/2 - 4, 8, 8);
+ gdk_window_get_width (window) / 2 - 4,
+ gdk_window_get_height (window) / 2 - 4,
+ 8, 8);
}
cairo_restore (cr);