[gnome-panel] clock: Use a lighter color to draw the outline of the map



commit de10b50e7934df38c375a2ae33f99d734db571a3
Author: Vincent Untz <vuntz gnome org>
Date:   Tue Feb 1 18:57:25 2011 +0100

    clock: Use a lighter color to draw the outline of the map

 applets/clock/clock-map.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/applets/clock/clock-map.c b/applets/clock/clock-map.c
index 82bfdf1..b6de7de 100644
--- a/applets/clock/clock-map.c
+++ b/applets/clock/clock-map.c
@@ -227,11 +227,19 @@ clock_map_draw (GtkWidget *this, cairo_t *cr)
         ClockMapPrivate *priv = PRIVATE (this);
 	GtkStyleContext *context;
 	GdkRGBA  color;
+        GtkSymbolicColor *symbolic, *lighter_symbolic;
         int width, height;
 
         context = gtk_widget_get_style_context (this);
         gtk_style_context_get_color (context, GTK_STATE_FLAG_ACTIVE, &color);
 
+        /* Color for the outline. We want a light version of the active color */
+        symbolic = gtk_symbolic_color_new_literal (&color);
+        lighter_symbolic = gtk_symbolic_color_new_shade (symbolic, 3);
+        gtk_symbolic_color_resolve (lighter_symbolic, NULL, &color);
+        gtk_symbolic_color_unref (symbolic);
+        gtk_symbolic_color_unref (lighter_symbolic);
+
 	if (!priv->shadow_map_pixbuf) {
                 g_warning ("Needed to refresh the map in draw event.");
 		clock_map_refresh (CLOCK_MAP (this));



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