diff options
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 22 |
1 files changed, 22 insertions, 0 deletions
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 |