[evolution] Make sure selection in ECalendar is visible
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Make sure selection in ECalendar is visible
- Date: Tue, 11 Sep 2012 13:18:23 +0000 (UTC)
commit 14e9bf1673c0ce53fc4e97a963b369d344c038cd
Author: Milan Crha <mcrha redhat com>
Date: Tue Sep 11 15:15:48 2012 +0200
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.
widgets/misc/e-calendar-item.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index 9907db7..eef63a0 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];
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]