diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-04-07 08:14:52 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-04-07 08:14:52 +0800 |
commit | 102637d0fe97ccdf3a1131d41d04286b135a6be0 (patch) | |
tree | 02f68b6183a61440fd305def30c52431a92fb6bf | |
parent | 09e4c2360ab1f2974909a5f371f6ae4c6bf4acdc (diff) | |
download | gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.tar gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.tar.gz gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.tar.bz2 gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.tar.lz gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.tar.xz gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.tar.zst gsoc2013-evolution-102637d0fe97ccdf3a1131d41d04286b135a6be0.zip |
Week view part of fix for #39895.
2003-04-06 Hans Petter Jansson <hpj@ximian.com>
Week view part of fix for #39895.
* gui/e-week-view-main-item.c (e_week_view_main_item_draw_day):
Use the UNFOCUSSED colour if we're not focused, rather than not
drawing anything.
* gui/e-week-view.c: Set up the UNFOCUSSED colour.
* gui/e-week-view.h: Add the UNFOCUSSED colour.
svn path=/trunk/; revision=20689
-rw-r--r-- | calendar/ChangeLog | 12 | ||||
-rw-r--r-- | calendar/gui/e-week-view-main-item.c | 9 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 4 | ||||
-rw-r--r-- | calendar/gui/e-week-view.h | 1 |
4 files changed, 23 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d8f8fc8674..7f9c83496f 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,15 @@ +2003-04-06 Hans Petter Jansson <hpj@ximian.com> + + Week view part of fix for #39895. + + * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day): + Use the UNFOCUSSED colour if we're not focused, rather than not + drawing anything. + + * gui/e-week-view.c: Set up the UNFOCUSSED colour. + + * gui/e-week-view.h: Add the UNFOCUSSED colour. + 2003-04-04 JP Rosevear <jpr@ximian.com> Fixes #40790 diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index 87682a354a..de0a4198fe 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -264,13 +264,16 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, /* If the day is selected, draw the blue background. */ selected = TRUE; - if (!GTK_WIDGET_HAS_FOCUS (week_view) - || week_view->selection_start_day == -1 + if (week_view->selection_start_day == -1 || week_view->selection_start_day > day || week_view->selection_end_day < day) selected = FALSE; if (selected) { - gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]); + if (GTK_WIDGET_HAS_FOCUS (week_view)) + gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]); + else + gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED]); + if (week_view->multi_week_view) { gdk_draw_rectangle (drawable, gc, TRUE, x + 2, y + 1, diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index b1c3290798..f893eeadb1 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -565,6 +565,10 @@ e_week_view_realize (GtkWidget *widget) week_view->colors[E_WEEK_VIEW_COLOR_SELECTED].green = 0 * 257; week_view->colors[E_WEEK_VIEW_COLOR_SELECTED].blue = 156 * 257; + week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED].red = 16 * 257; + week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED].green = 78 * 257; + week_view->colors[E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED].blue = 139 * 257; + week_view->colors[E_WEEK_VIEW_COLOR_DATES].red = 0 * 257; week_view->colors[E_WEEK_VIEW_COLOR_DATES].green = 0 * 257; week_view->colors[E_WEEK_VIEW_COLOR_DATES].blue = 0 * 257; diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h index f45ca7eb1d..8723d14cf9 100644 --- a/calendar/gui/e-week-view.h +++ b/calendar/gui/e-week-view.h @@ -105,6 +105,7 @@ typedef enum E_WEEK_VIEW_COLOR_EVENT_TEXT, E_WEEK_VIEW_COLOR_GRID, E_WEEK_VIEW_COLOR_SELECTED, + E_WEEK_VIEW_COLOR_SELECTED_UNFOCUSSED, E_WEEK_VIEW_COLOR_DATES, E_WEEK_VIEW_COLOR_DATES_SELECTED, E_WEEK_VIEW_COLOR_TODAY, |