From 266d51479ab6bc1fb2afddf73ef275047e6ced37 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 3 Jul 2009 16:17:28 +0200 Subject: Bug #251694 - Highlight current day in a calendar --- calendar/gui/e-calendar-view.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'calendar/gui/e-calendar-view.c') diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 07e067e7f5..8cab14b861 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -2686,3 +2686,26 @@ e_calendar_utils_show_info_silent (GtkWidget *widget) e_activity_handler_make_error (handler, "calendar", E_LOG_WARNINGS, widget); } + +/* returns either light or dark yellow, based on the base_background, + which is the default background color */ +GdkColor +get_today_background (const GdkColor base_background) +{ + GdkColor res = base_background; + + if (res.red > 0x7FFF) { + /* light yellow for a light theme */ + res.red = 0xFFFF; + res.green = 0xFFFF; + res.blue = 0xC0C0; + } else { + /* dark yellow for a dark theme */ + res.red = 0x3F3F; + res.green = 0x3F3F; + res.blue = 0x0000; + } + + return res; +} + -- cgit v1.2.3