File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,6 +201,19 @@ def setup_resources():
201201 Gdk .Screen .get_default (), provider ,
202202 Gtk .STYLE_PROVIDER_PRIORITY_APPLICATION )
203203
204+ # This is a hack to get the LinkMap to use Gtk.TextView background
205+ # colour. Ideally we'd have a symbolic colour, or could more easily
206+ # do this on the widget itself.
207+ textview = Gtk .TextView ()
208+ textview_context = textview .get_style_context ()
209+ bg_colour = textview_context .get_background_color (Gtk .StateFlags .NORMAL )
210+ linkmap_css = "LinkMap { background-color: %s; }" % bg_colour .to_string ()
211+ linkmap_provider = Gtk .CssProvider ()
212+ linkmap_provider .load_from_data (linkmap_css )
213+ Gtk .StyleContext .add_provider_for_screen (
214+ Gdk .Screen .get_default (), linkmap_provider ,
215+ Gtk .STYLE_PROVIDER_PRIORITY_APPLICATION )
216+
204217 style_path = os .path .join (meld .conf .DATADIR , "styles" )
205218 GtkSource .StyleSchemeManager .get_default ().append_search_path (style_path )
206219
You can’t perform that action at this time.
0 commit comments