aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-top-item.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-04-24 22:01:46 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-04-24 22:01:46 +0800
commit94a486a7b4207e617da30b172aa9873e0fbb0215 (patch)
tree032fd6642291a41b61a17692bf5a69e3dd41d316 /calendar/gui/e-day-view-top-item.c
parent0c3a86937674a6214f68746ee5a273e195228fde (diff)
downloadgsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.tar
gsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.tar.gz
gsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.tar.bz2
gsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.tar.lz
gsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.tar.xz
gsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.tar.zst
gsoc2013-evolution-94a486a7b4207e617da30b172aa9873e0fbb0215.zip
added new source files and pixmaps, and removed old source files, which
2000-04-24 Damon Chaplin <damon@helixcode.com> * 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 <gtk/gtkwindow.h>' 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
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r--calendar/gui/e-day-view-top-item.c12
1 files changed, 10 insertions, 2 deletions
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 <config.h>
#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);
}