fix issue with older vte lib

This commit is contained in:
Matt Rose 2020-11-18 09:46:25 -05:00
parent ebc266e554
commit 1be51cccad
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):
### get_color_background_for_draw is not available in older
### versions of vte
try:
bgc = Vte.Terminal.get_color_background_for_draw(self) 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