only set clear background when background_image in config

This commit is contained in:
Matt Rose 2020-10-08 15:38:09 -04:00
parent 8bc1af0749
commit 251d89c8cd
1 changed files with 3 additions and 2 deletions

View File

@ -138,6 +138,9 @@ class Terminal(Gtk.VBox):
self.vte = Vte.Terminal()
self.background_image = None
if self.config['background_image'] != '':
self.vte.set_clear_background(False)
self.vte.connect("draw",self.background_draw)
try:
self.background_image = GdkPixbuf.Pixbuf.new_from_file(self.config['background_image'])
except Exception:
@ -155,8 +158,6 @@ class Terminal(Gtk.VBox):
self.vte.show()
self.vte.set_clear_background(False)
self.vte.connect("draw",self.background_draw)
self.default_encoding = self.vte.get_encoding()
self.update_url_matches()