Merge pull request #233 from mattrose/fix-transparent-bg

only set clear background when background_image in config
This commit is contained in:
Matt Rose 2020-10-08 15:44:51 -04:00 committed by GitHub
commit 296e1257a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

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