aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-03 22:17:28 +0800
committerMilan Crha <mcrha@redhat.com>2009-07-03 22:17:28 +0800
commit266d51479ab6bc1fb2afddf73ef275047e6ced37 (patch)
tree431422e6c38a1497a763f69bb1d70ed2480806c4 /calendar/gui/e-calendar-view.c
parent044adbe76a1bf09d83ece2ad7944d1d549fa4f34 (diff)
downloadgsoc2013-evolution-266d51479ab6bc1fb2afddf73ef275047e6ced37.tar.gz
gsoc2013-evolution-266d51479ab6bc1fb2afddf73ef275047e6ced37.tar.zst
gsoc2013-evolution-266d51479ab6bc1fb2afddf73ef275047e6ced37.zip
Bug #251694 - Highlight current day in a calendar
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c23
1 files changed, 23 insertions, 0 deletions
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;
+}
+