aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-top-item.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-27 23:38:25 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-07-29 00:22:46 +0800
commite119ae2938fb1e3b41191fe958857c4b8f414a32 (patch)
tree5202aea6ce24ef54be14f700be148e9a3b9b9985 /calendar/gui/e-day-view-top-item.c
parentfe2f720c14d3f39ca6694f1b56b7f4e8121e732b (diff)
downloadgsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.tar
gsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.tar.gz
gsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.tar.bz2
gsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.tar.lz
gsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.tar.xz
gsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.tar.zst
gsoc2013-evolution-e119ae2938fb1e3b41191fe958857c4b8f414a32.zip
Bug #575581 - All Day Events Should Not Depend On Calendar Scrolling
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r--calendar/gui/e-day-view-top-item.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index c4865ee707..09ed59e6e4 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -287,14 +287,17 @@ e_day_view_top_item_draw (GnomeCanvasItem *canvas_item,
e_day_view_top_item_get_day_label (day_view, day, buffer, sizeof (buffer));
clip_rect.x = day_view->day_offsets[day] - x;
clip_rect.y = 2 - y;
- clip_rect.width = day_view->day_widths[day];
+ if (day_view->days_shown == 1)
+ clip_rect.width = day_view->top_canvas->allocation.width - day_view->day_offsets[day];
+ else
+ clip_rect.width = day_view->day_widths[day];
clip_rect.height = item_height - 2;
gdk_gc_set_clip_rectangle (fg_gc, &clip_rect);
layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
pango_layout_get_pixel_size (layout, &date_width, NULL);
- date_x = day_view->day_offsets[day] + (day_view->day_widths[day] - date_width) / 2;
+ date_x = day_view->day_offsets[day] + (clip_rect.width - date_width) / 2;
gdk_draw_layout (drawable, fg_gc,
date_x - x,