aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-09-11 21:15:48 +0800
committerMilan Crha <mcrha@redhat.com>2012-09-11 21:15:48 +0800
commit14e9bf1673c0ce53fc4e97a963b369d344c038cd (patch)
treead576599a1a595d19e05640ca86e1b7b7a5329bc /widgets/misc
parent832de6f6d63b60f85e1144cd8afbe836dff4a565 (diff)
downloadgsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.tar
gsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.tar.gz
gsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.tar.bz2
gsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.tar.lz
gsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.tar.xz
gsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.tar.zst
gsoc2013-evolution-14e9bf1673c0ce53fc4e97a963b369d344c038cd.zip
Make sure selection in ECalendar is visible
The GtkStyle's GTK_STATE_ACTIVE background color can match background color of GTK_STATE_NORMAL, when there is not visible selected days in the calendar, thus fallback to GTK_STATE_SELECTED colors in that case.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-calendar-item.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 9907db7514..eef63a02f7 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -2192,6 +2192,13 @@ e_calendar_item_get_day_style (ECalendarItem *calitem,
} else {
*fg_color = &style->text[GTK_STATE_ACTIVE];
*bg_color = &style->base[GTK_STATE_ACTIVE];
+
+ if ((*bg_color)->red == style->base[GTK_STATE_NORMAL].red &&
+ (*bg_color)->green == style->base[GTK_STATE_NORMAL].green &&
+ (*bg_color)->blue == style->base[GTK_STATE_NORMAL].blue) {
+ *fg_color = &style->text[GTK_STATE_SELECTED];
+ *bg_color = &style->base[GTK_STATE_SELECTED];
+ }
}
}
}