diff options
author | Not Zed <NotZed@Ximian.com> | 2003-03-30 04:04:52 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-03-30 04:04:52 +0800 |
commit | 470bb0bff4c3623434b12e55a4934c84defee615 (patch) | |
tree | d81ffe3cc79bcf3a46f1dab27ca36c7f367daadd /calendar | |
parent | e72c115df8321539521d1e1e793e27082c4d94b1 (diff) | |
download | gsoc2013-evolution-470bb0bff4c3623434b12e55a4934c84defee615.tar.gz 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')
-rw-r--r-- | calendar/ChangeLog | 15 | ||||
-rw-r--r-- | calendar/gui/e-day-view-main-item.c | 8 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 4 | ||||
-rw-r--r-- | calendar/gui/e-day-view.h | 1 |
4 files changed, 25 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index bc177b7cc2..0dba61eb4b 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,18 @@ +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. + 2003-03-28 JP Rosevear <jpr@ximian.com> * gui/e-itip-control.c (get_servers): the shell client is a 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); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index d43d0f71ed..d557b43c5c 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -977,6 +977,10 @@ e_day_view_realize (GtkWidget *widget) day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED].green = 0 * 257; day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED].blue = 156 * 257; + day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED].red = 16 * 257; + day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED].green = 78 * 257; + day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED].blue = 139 * 257; + day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].red = 0x8000; day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].green = 0x8000; day_view->colors[E_DAY_VIEW_COLOR_BG_GRID].blue = 0x8000; diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h index 5419e336aa..8743751be1 100644 --- a/calendar/gui/e-day-view.h +++ b/calendar/gui/e-day-view.h @@ -141,6 +141,7 @@ typedef enum E_DAY_VIEW_COLOR_BG_WORKING, E_DAY_VIEW_COLOR_BG_NOT_WORKING, E_DAY_VIEW_COLOR_BG_SELECTED, + E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED, E_DAY_VIEW_COLOR_BG_GRID, E_DAY_VIEW_COLOR_BG_TOP_CANVAS, |