From 94a486a7b4207e617da30b172aa9873e0fbb0215 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Mon, 24 Apr 2000 14:01:46 +0000 Subject: added new source files and pixmaps, and removed old source files, which 2000-04-24 Damon Chaplin * gui/Makefile.am: added new source files and pixmaps, and removed old source files, which can be deleted. * gui/e-week-view-titles-item.[hc]: * gui/e-week-view-main-item.[hc]: * gui/e-week-view-event-item.[hc]: * gui/e-week-view.[hc]: new files implementing the week/month views. * gui/yearview.xpm: * gui/monthview.xpm: * gui/weekview.xpm: * gui/workweekview.xpm: * gui/dayview.xpm: new pixmaps for the toolbar buttons. These aren't intended to be the final pixmaps. * gui/calendar-commands.c: added radio buttons to the toolbar to switch between the calendar views, and moved the am_pm_flag here so we can get rid of view-utils.c. * gui/gnome-cal.[hc]: made it a subclass of GtkVBox, rearranged the widgets into 2 notebooks, and added the selection_start_time and selection_end_time fields. * gui/goto.c: updated to use new selection time range. * gui/quick-view.c: added '#include ' so it compiles. * gui/e-day-view.[hc]: changed the interface to support the new selection time range, got rid of a few debugging messages and changed a few bits. svn path=/trunk/; revision=2583 --- calendar/gui/e-day-view-top-item.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index fe19c6b491..6d5ea60854 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -26,6 +26,7 @@ * EDayViewTopItem - displays the top part of the Day/Work Week calendar view. */ +#include #include "e-day-view-top-item.h" static void e_day_view_top_item_class_init (EDayViewTopItemClass *class); @@ -496,6 +497,7 @@ e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, GtkStyle *style; GdkGC *fg_gc, *bg_gc; GdkPoint points[3]; + gint c1, c2; day_view = dvtitem->day_view; @@ -510,9 +512,15 @@ e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, points[2].x = x; points[2].y = y + h - 1; + /* If the height is odd we can use the same central point for both + lines. If it is even we use different end-points. */ + c1 = c2 = y + (h / 2); + if (h % 2 == 0) + c1--; + gdk_draw_polygon (drawable, bg_gc, TRUE, points, 3); - gdk_draw_line (drawable, fg_gc, x, y, x + w, y + (h / 2) - 1); - gdk_draw_line (drawable, fg_gc, x, y + h - 1, x + w, y + h - (h / 2)); + gdk_draw_line (drawable, fg_gc, x, y, x + w, c1); + gdk_draw_line (drawable, fg_gc, x, y + h - 1, x + w, c2); } -- cgit v1.2.3