Commit 07d03162 authored by Kai Willadsen's avatar Kai Willadsen

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

parent 68a7f0ee
......@@ -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)
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment