[gtksourceview] Shade the secondary cursor color.



commit 8aee32d9bd4ae4f2477565d6015fddcf451aa3f0
Author: Paolo Borelli <pborelli gnome org>
Date:   Thu Jan 13 23:16:28 2011 +0100

    Shade the secondary cursor color.
    
    When the secondary cursor color is not specified and we obtain it from
    the primary cursor color, shade it with a 0.5 factor. This got lost in
    the StyleContext port.

 gtksourceview/gtksourcestylescheme.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index e65090f..03b5427 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -795,6 +795,12 @@ update_cursor_colors (GtkWidget      *widget,
 
 		context = gtk_widget_get_style_context (widget);
 		gtk_style_context_get_background_color (context, 0, &secondary_color);
+
+		/* shade the secondary cursor */
+		secondary_color.red *= 0.5;
+		secondary_color.green *= 0.5;
+		secondary_color.blue *= 0.5;
+
 		secondary = &secondary_color;
 	}
 



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