From 044adbe76a1bf09d83ece2ad7944d1d549fa4f34 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 3 Jul 2009 14:15:16 +0200 Subject: Bug #236996 - Calendar display for weekends in month view --- calendar/gui/e-week-view.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'calendar/gui/e-week-view.c') diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 7853adda5a..3db7e85e06 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -740,6 +740,27 @@ e_week_view_realize (GtkWidget *widget) week_view->meeting_icon = e_icon_factory_get_icon ("stock_people", GTK_ICON_SIZE_MENU); } +static GdkColor +color_inc (GdkColor c, gint amount) +{ + #define dec(x) \ + if (x + amount >= 0 \ + && x + amount <= 0xFFFF) \ + x += amount; \ + else if (amount <= 0) \ + x = 0; \ + else \ + x = 0xFFFF; + + dec (c.red); + dec (c.green); + dec (c.blue); + + #undef dec + + return c; +} + static void e_week_view_set_colors(EWeekView *week_view, GtkWidget *widget) { @@ -754,6 +775,7 @@ e_week_view_set_colors(EWeekView *week_view, GtkWidget *widget) week_view->colors[E_WEEK_VIEW_COLOR_DATES] = widget->style->text[GTK_STATE_NORMAL]; week_view->colors[E_WEEK_VIEW_COLOR_DATES_SELECTED] = widget->style->text[GTK_STATE_SELECTED]; week_view->colors[E_WEEK_VIEW_COLOR_TODAY] = widget->style->base[GTK_STATE_SELECTED]; + week_view->colors[E_WEEK_VIEW_COLOR_MONTH_NONWORKING_DAY] = color_inc (week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS], -0x0A0A); } static void -- cgit v1.2.3