Merge pull request #294 from mattrose/issue292

fix issue with older vte lib
This commit is contained in:
Matt Rose 2020-11-18 12:52:08 -05:00 committed by GitHub
commit d845e837df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -42,7 +42,13 @@ class Overpaint(Vte.Terminal):
self.overpaint = b self.overpaint = b
def do_draw(self,cr): def do_draw(self,cr):
bgc = Vte.Terminal.get_color_background_for_draw(self) ### get_color_background_for_draw is not available in older
### versions of vte
try:
bgc = Vte.Terminal.get_color_background_for_draw(self)
except AttributeError as e:
bgc = Gdk.RGBA()
bgc.parse(self.config['background_color'])
Vte.Terminal.do_draw(self,cr) Vte.Terminal.do_draw(self,cr)
if self.overpaint: if self.overpaint:
bgc.alpha = self.dim_l bgc.alpha = self.dim_l