aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
authorLi Yuan <li.yuan@sun.com>2004-11-04 10:03:49 +0800
committerHarry Lu <haip@src.gnome.org>2004-11-04 10:03:49 +0800
commit488357c9e175d99d53948ea9f97a21f38995ef42 (patch)
treeac9076a3d8866bc9c3c0e0e16bbcde6ba1c0148a /calendar/gui/e-day-view-main-item.c
parent32f6a8df2adac2df3828a91a724e3a60e6f14c62 (diff)
downloadgsoc2013-evolution-488357c9e175d99d53948ea9f97a21f38995ef42.tar.gz
gsoc2013-evolution-488357c9e175d99d53948ea9f97a21f38995ef42.tar.zst
gsoc2013-evolution-488357c9e175d99d53948ea9f97a21f38995ef42.zip
Fixes #6767
2004-11-04 Li Yuan <li.yuan@sun.com> Fixes #6767 * gui/e-day-view-main-item.c: (e_day_view_main_item_draw_day_event): use widget->style instead of hard code colors. * gui/e-day-view.c: (e_day_view_realize), (e_day_view_set_colors), (e_day_view_style_set), (e_day_view_reshape_long_event), (e_day_view_reshape_day_event): ditto. * gui/e-week-view.c: (e_week_view_realize), (e_week_view_set_colors), (e_week_view_style_set), (e_week_view_reshape_event_span): ditto. svn path=/trunk/; revision=27827
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 4aaf02fcfb..9b2a40b9fe 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -500,6 +500,8 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
since that is used for multiple events. But then you can't see
where the event in the first column finishes. */
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND]);
+
if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), event->comp_data),
&bg_color)) {
GdkColormap *colormap;
@@ -524,7 +526,8 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
/* Draw the right edge of the vertical bar. */
- gdk_draw_line (drawable, style->black_gc,
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER]);
+ gdk_draw_line (drawable, gc,
item_x + E_DAY_VIEW_BAR_WIDTH - 1,
item_y + 1,
item_x + E_DAY_VIEW_BAR_WIDTH - 1,
@@ -551,6 +554,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
/* Only fill it in if the event isn't TRANSPARENT. */
e_cal_component_get_transparency (comp, &transparency);
if (transparency != E_CAL_COMPONENT_TRANSP_TRANSPARENT) {
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
gdk_draw_rectangle (drawable, gc, TRUE,
item_x + 1, bar_y1,
E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1);
@@ -559,8 +563,10 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
/* Draw the box around the entire event. Do this after drawing
the colored bar so we don't have to worry about being 1
pixel out. */
- gdk_draw_rectangle (drawable, style->black_gc, FALSE,
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER]);
+ gdk_draw_rectangle (drawable, gc, FALSE,
item_x, item_y, MAX (item_w - 1, 0), item_h - 1);
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
#if 0
/* Draw the horizontal bars above and beneath the event if it