diff options
author | Damon Chaplin <damon@helixcode.com> | 2001-01-18 02:45:40 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-01-18 02:45:40 +0800 |
commit | 08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd (patch) | |
tree | 511f5630856246bf8fa2a917b5d51dd11bf5240b /calendar/gui/e-week-view-event-item.c | |
parent | 60d8fc824908c3522765003de4ef821005c415ff (diff) | |
download | gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.tar gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.tar.gz gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.tar.bz2 gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.tar.lz gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.tar.xz gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.tar.zst gsoc2013-evolution-08ea9ff68d9b544242dfe7f0f4409e90f2f24ebd.zip |
gui/e-week-view*.c don't use the theme colors at all within the graphical
2001-01-17 Damon Chaplin <damon@helixcode.com>
* gui/e-week-view*.c
* gui/e-day-view*.c: don't use the theme colors at all within
the graphical parts of the widgets, since they may clash with
our colors. May make them configurable in future so people can tweak
them to go with their theme. At least the calendars are usable in any
theme now, even though the colors may not go well with the theme.
Also set the font of all the EText items in style_set.
* gui/e-week-view-event-item.c (e_week_view_event_item_draw): don't
draw the icons if we are editing the event.
* gui/e-day-view.c:
* gui/e-week-view.c: reinstated the optimizations so we don't do a
complete relayout if the event's dates haven't been changed.
(Though we still do a re-layout when recurring events change, since
comparing all the RDATES/RRULES/EXDATES/EXRULES is too much hassle.)
A side-effect of this change is that the EWeekView won't crash so
often - only recurring events will be a problem.
* cal-util/cal-component.[hc]: added function to check if the start
and end dates of a component match. Used for optimizing the updating
of the EDayView & EWeekView.
svn path=/trunk/; revision=7593
Diffstat (limited to 'calendar/gui/e-week-view-event-item.c')
-rw-r--r-- | calendar/gui/e-week-view-event-item.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 5615e86bb6..8adfdd96ff 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -416,13 +416,15 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, clip_rect.width = x2 - x1 - E_WEEK_VIEW_EVENT_R_PAD - E_WEEK_VIEW_EVENT_BORDER_WIDTH + 1; clip_rect.height = y2 - y1 + 1; - gdk_gc_set_clip_rectangle (fg_gc, &clip_rect); + gdk_gc_set_clip_rectangle (gc, &clip_rect); + + gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_TEXT]); e_week_view_draw_time (week_view, drawable, time_x, time_y, start_hour, start_minute); - gdk_gc_set_clip_rectangle (fg_gc, NULL); + gdk_gc_set_clip_rectangle (gc, NULL); /* We don't want the end time to be drawn over the start time, so we increase the minimum position. */ @@ -455,7 +457,9 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, } /* Draw the icons. */ - if (span->text_item) { + if (span->text_item && + week_view->editing_event_num != wveitem->event_num + && week_view->editing_span_num != wveitem->span_num) { icon_x = span->text_item->x1 - x; e_week_view_event_item_draw_icons (wveitem, drawable, icon_x, icon_y, @@ -474,7 +478,7 @@ e_week_view_draw_time (EWeekView *week_view, gint minute) { GtkStyle *style; - GdkGC *fg_gc; + GdkGC *gc; GdkFont *font, *small_font; gint hour_to_display, suffix_width; gint time_y_normal_font, time_y_small_font; @@ -483,7 +487,8 @@ e_week_view_draw_time (EWeekView *week_view, style = GTK_WIDGET (week_view)->style; font = style->font; small_font = week_view->small_font; - fg_gc = style->fg_gc[GTK_STATE_NORMAL]; + gc = week_view->main_gc; + time_y_normal_font = time_y_small_font = time_y + font->ascent; if (small_font) @@ -498,24 +503,24 @@ e_week_view_draw_time (EWeekView *week_view, /* Draw the hour. */ if (hour_to_display < 10) - gdk_draw_text (drawable, font, fg_gc, + gdk_draw_text (drawable, font, gc, time_x + week_view->digit_width, time_y_normal_font, buffer + 1, 1); else - gdk_draw_text (drawable, font, fg_gc, + gdk_draw_text (drawable, font, gc, time_x, time_y_normal_font, buffer, 2); time_x += week_view->digit_width * 2; /* Draw the start minute, in the small font. */ - gdk_draw_text (drawable, week_view->small_font, fg_gc, + gdk_draw_text (drawable, week_view->small_font, gc, time_x, time_y_small_font, buffer + 3, 2); time_x += week_view->small_digit_width * 2; /* Draw the 'am'/'pm' suffix, if 12-hour format. */ if (!week_view->use_24_hour_format) { - gdk_draw_string (drawable, font, fg_gc, + gdk_draw_string (drawable, font, gc, time_x, time_y_normal_font, suffix); } } else { @@ -523,11 +528,11 @@ e_week_view_draw_time (EWeekView *week_view, g_snprintf (buffer, sizeof (buffer), "%2i:%02i%s", hour_to_display, minute, suffix); if (hour_to_display < 10) - gdk_draw_string (drawable, font, fg_gc, + gdk_draw_string (drawable, font, gc, time_x + week_view->digit_width, time_y_normal_font, buffer + 1); else - gdk_draw_string (drawable, font, fg_gc, + gdk_draw_string (drawable, font, gc, time_x, time_y_normal_font, buffer); |