[evolution/clutter-calendar-v2] Draw Month view selection better.



commit 13be624f62714990305bebb75330d5719672f1f5
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Mon Sep 13 10:57:12 2010 +0530

    Draw Month view selection better.

 calendar/gui/e-week-view-clutter-main-item.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/e-week-view-clutter-main-item.c b/calendar/gui/e-week-view-clutter-main-item.c
index 0b19da9..ea53e95 100644
--- a/calendar/gui/e-week-view-clutter-main-item.c
+++ b/calendar/gui/e-week-view-clutter-main-item.c
@@ -91,6 +91,7 @@ week_view_clutter_main_item_draw_day_selection (EWeekViewClutterMainItem *main_i
 	PangoLayout *layout;
 	gboolean today = FALSE;
 	CalWeekdays working_days;
+	GdkColor *selcolor;
 
 	week_view = e_week_view_clutter_main_item_get_week_view (main_item);
 	style = gtk_widget_get_style (GTK_WIDGET (week_view));
@@ -128,6 +129,17 @@ week_view_clutter_main_item_draw_day_selection (EWeekViewClutterMainItem *main_i
 	cairo_stroke (cr);
 	cairo_restore (cr);
 
+	/* Draw the selection area with a might/transparent hint */
+	cairo_save (cr);
+	selcolor = &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED];
+	cairo_set_source_rgba (cr, (double)selcolor->red/65535.0, 
+			(double)selcolor->green/65535.0, 
+			(double)selcolor->blue/65535.0,
+			0.2);
+	cairo_rectangle (cr, x, y, width-2, height-2);
+	cairo_fill (cr);
+	cairo_restore (cr);
+
 	/* If the day is selected, draw the blue background. */
 	cairo_save (cr);
 	selected = TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]