[gtksourceview] map: get the selected color for the scrubber



commit 164d997aee5d0ae4fb676edade2200b562faee0c
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun May 17 15:50:21 2015 +0200

    map: get the selected color for the scrubber

 gtksourceview/gtksourcemap.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/gtksourceview/gtksourcemap.c b/gtksourceview/gtksourcemap.c
index b3c9543..814a19b 100644
--- a/gtksourceview/gtksourcemap.c
+++ b/gtksourceview/gtksourcemap.c
@@ -192,13 +192,12 @@ gtk_source_map_rebuild_css (GtkSourceMap *map)
                        GtkStyleContext *context;
                        GdkRGBA color;
 
-                       /* FIXME: how was again to get the selection color? */
                        context = gtk_widget_get_style_context (GTK_WIDGET (priv->view));
                        gtk_style_context_save (context);
                        gtk_style_context_add_class (context, "view");
-                       gtk_style_context_get_color (context,
-                                                    GTK_STATE_FLAG_NORMAL,
-                                                    &color);
+                       gtk_style_context_get_background_color (context,
+                                                               GTK_STATE_FLAG_SELECTED,
+                                                               &color);
                        gtk_style_context_restore (context);
                        background = gdk_rgba_to_string (&color);
                }


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