aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-03-30 04:04:52 +0800
committerHans Petter <hansp@src.gnome.org>2003-03-30 04:04:52 +0800
commit470bb0bff4c3623434b12e55a4934c84defee615 (patch)
treed81ffe3cc79bcf3a46f1dab27ca36c7f367daadd /calendar/gui/e-day-view-main-item.c
parente72c115df8321539521d1e1e793e27082c4d94b1 (diff)
downloadgsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar
gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar.gz
gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar.bz2
gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar.lz
gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar.xz
gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar.zst
gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.zip
Fixes #39895
2003-03-29 Not Zed <NotZed@Ximian.com> Fixes #39895 * gui/e-day-view.h (EDayViewColors): add an unfocussed colour to draw the selection in when we're not focussed. * gui/e-day-view.c (e_day_view_realize): Initialise E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED to be 1/2 saturation of the focussed colour. * gui/e-day-view-main-item.c (e_day_view_main_item_draw): Use the UFOCUSSED colour if we aren't focussed, rather than just not drawing anything. svn path=/trunk/; revision=20579
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 98b72510ae..4d57da1b74 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -218,8 +218,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
}
/* Paint the selection background. */
- if (GTK_WIDGET_HAS_FOCUS (day_view)
- && day_view->selection_start_day != -1
+ if (day_view->selection_start_day != -1
&& !day_view->selection_in_top_canvas) {
for (day = day_view->selection_start_day;
day <= day_view->selection_end_day;
@@ -240,7 +239,10 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
rect_y = start_row * day_view->row_height - y;
rect_height = (end_row - start_row + 1) * day_view->row_height;
- gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED]);
+ if (GTK_WIDGET_HAS_FOCUS(day_view))
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED]);
+ else
+ gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED]);
gdk_draw_rectangle (drawable, gc, TRUE,
rect_x, rect_y,
rect_width, rect_height);