From fdcab764082e9e4e19a8ea93c17aadf2cd5c9466 Mon Sep 17 00:00:00 2001 From: Matt Rose Date: Sat, 14 Nov 2020 11:03:58 -0500 Subject: [PATCH] convert the unfocused terminal font brightness to alpha transparency level --- terminatorlib/terminal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index e91c9c4c..a8f3734c 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -36,7 +36,8 @@ class Overpaint(Vte.Terminal): def __init__(self): Vte.Terminal.__init__(self) self.config = Config() - + self.dim_p = float(self.config['inactive_color_offset']) + self.dim_l = round(1.0 - self.dim_p,3) def dim(self,b): self.overpaint = b @@ -44,7 +45,7 @@ class Overpaint(Vte.Terminal): bgc = Vte.Terminal.get_color_background_for_draw(self) Vte.Terminal.do_draw(self,cr) if self.overpaint: - bgc.alpha = float(self.config['inactive_color_offset']) + bgc.alpha = self.dim_l cr.set_operator(cairo.Operator.OVER) Gdk.cairo_set_source_rgba(cr,bgc) cr.rectangle(0.0,0.0,self.get_allocated_width(),self.get_allocated_height())