[meld] bin/meld: Remove textview-bg hack for LinkMap, using named color



commit 07d0316248b31f789c01837793daa84fa5eceece
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Thu Feb 11 07:30:21 2016 +1000

    bin/meld: Remove textview-bg hack for LinkMap, using named color

 bin/meld      |   17 -----------------
 data/meld.css |    1 +
 2 files changed, 1 insertions(+), 17 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index aba1ff2..aeb9cd3 100755
--- a/bin/meld
+++ b/bin/meld
@@ -202,23 +202,6 @@ def setup_resources():
         Gdk.Screen.get_default(), provider,
         Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
 
-    # This is a hack to get the LinkMap to use Gtk.TextView background
-    # colour. Ideally we'd have a symbolic colour, or could more easily
-    # do this on the widget itself.
-    textview = Gtk.TextView()
-    textview_context = textview.get_style_context()
-    textview_context.save()
-    textview_context.set_state(Gtk.StateFlags.NORMAL)
-    bg_colour = textview_context.get_background_color(
-        textview_context.get_state())
-    textview_context.restore()
-    linkmap_css = "link-map { background-color: %s; }" % bg_colour.to_string()
-    linkmap_provider = Gtk.CssProvider()
-    linkmap_provider.load_from_data(linkmap_css)
-    Gtk.StyleContext.add_provider_for_screen(
-        Gdk.Screen.get_default(), linkmap_provider,
-        Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
-
     style_path = os.path.join(meld.conf.DATADIR, "styles")
     GtkSource.StyleSchemeManager.get_default().append_search_path(style_path)
 
diff --git a/data/meld.css b/data/meld.css
index f121dbb..77366d8 100644
--- a/data/meld.css
+++ b/data/meld.css
@@ -14,6 +14,7 @@ link-map {
     border-width: 0 0 1px 0;
     border-style: solid;
     border-color: @borders;
+    background-color: @theme_base_color;
 }
 
 .meld-vc-console-pane {


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