[evolution/kill-bonobo] Bug #575581 - All Day Events Should Not Depend On Calendar Scrolling
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution/kill-bonobo] Bug #575581 - All Day Events Should Not Depend On Calendar Scrolling
- Date: Wed, 5 Aug 2009 21:01:36 +0000 (UTC)
commit e119ae2938fb1e3b41191fe958857c4b8f414a32
Author: Milan Crha <mcrha redhat com>
Date: Mon Jul 27 17:38:25 2009 +0200
Bug #575581 - All Day Events Should Not Depend On Calendar Scrolling
calendar/gui/e-day-view-top-item.c | 7 +++++--
calendar/gui/e-day-view.c | 8 +++++---
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index c4865ee..09ed59e 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,
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index c3533e6..7e7e5f7 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -6692,9 +6692,11 @@ e_day_view_get_long_event_position (EDayView *day_view,
}
*item_x = day_view->day_offsets[*start_day] + E_DAY_VIEW_BAR_WIDTH;
- *item_w = day_view->day_offsets[*end_day + 1] - *item_x
- - E_DAY_VIEW_GAP_WIDTH;
- *item_w = MAX (*item_w, 0);
+ if (day_view->days_shown == 1)
+ *item_w = day_view->top_canvas->allocation.width;
+ else
+ *item_w = day_view->day_offsets[*end_day + 1];
+ *item_w = MAX (*item_w - *item_x - E_DAY_VIEW_GAP_WIDTH, 0);
*item_y = (event->start_row_or_col) * day_view->top_row_height;
*item_h = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP;
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]