[gnome-builder] quick-highlight: add GSV style for quick-highlight



commit 7141026884aab8a606e89364481d805dc8b4211a
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 27 12:03:42 2016 -0700

    quick-highlight: add GSV style for quick-highlight
    
    This is a bit more visible than the current-line highlight.

 data/style-schemes/builder.xml                     |    3 +++
 .../gbp-quick-highlight-view-addin.c               |    5 ++++-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/data/style-schemes/builder.xml b/data/style-schemes/builder.xml
index 8055d2e..16578e5 100644
--- a/data/style-schemes/builder.xml
+++ b/data/style-schemes/builder.xml
@@ -107,6 +107,9 @@
   <!-- Search Shadow -->
   <style name="search-shadow"               background="#rgba(0,0,0,0.2)"/>
 
+  <!-- Quick Highlight Plugin -->
+  <style name="quick-highlight"             background="#rgba(221,74,104,.15)"/>
+
   <style name="c:comment"                   foreground="#8b9eab"/>
   <style name="c:preprocessor"              foreground="#8194a6" bold="false"/>
   <style name="c:boolean"                   foreground="#0077aa"/>
diff --git a/plugins/quick-highlight/gbp-quick-highlight-view-addin.c 
b/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
index e68b25c..53a97ad 100644
--- a/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
+++ b/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
@@ -156,7 +156,10 @@ gbp_quick_highlight_view_addin_load (IdeEditorViewAddin *addin,
                                        NULL);
 
   style_scheme = gtk_source_buffer_get_style_scheme (buffer);
-  style = gtk_source_style_scheme_get_style (style_scheme, "current-line");
+
+  style = gtk_source_style_scheme_get_style (style_scheme, "quick-highlight");
+  if (style == NULL)
+    style = gtk_source_style_scheme_get_style (style_scheme, "current-line");
 
   gtk_source_search_context_set_match_style (self->search_context, style);
 


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