Comment 18 for bug 1599453

Revision history for this message
Braden Kelley (redbmk) wrote :

OK, I've been playing with your changes and I think we're really close.

It wasn't always transparent - for applications like vim it would still be opaque. I fixed that by changing a couple lines in terminal.py (see the diff below).

Then, I didn't know you could import a css file, so I think that is way cleaner than the inline css I had done before. The css that seems to work is below as well - I simplified what you had a little bit and made a couple additions to get it to work with the transparency changes I made in terminal.py. I think we're nearly there - I noticed a few issues with some themes other than what you had mentioned.

Here are the themes that are on my system in the debugger menu: Raleigh, Numix, Radiance, Adwaita, HighContrast, and Ambience. Raleigh doesn't actually show up in my system-wide themes, it just shows up in the interactive debugger...not sure what it is.

As far as I can see so far, these are the issues with them:

Raleigh:
 * Doesn't like @theme_bg_color. Instead it seems to prefer @bg_color.
 * Has a thin, transparent line around the whole frame.

Numix:
 * The titlebar is no longer red - it appears white, which makes the text unreadable.

Radiance:
 * The scrollbar has a weird transparent strip

HighContrast:
 * The scrollbar base is transparent when window is not focused

Ambiance:
 * Nothing new besides what you noticed - the scrollbar issue seems to be a related to the issue with Radiance and HighContrast.

terminator.css
==============

.terminator-terminal-window,
.notebook {
  background-color: transparent;
}

.pane-separator,
.terminator-terminal-searchbar,
.notebook.header {
  background-color: @theme_bg_color;
}

terminal.py
===========

diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py
index 0ee4851..c5471e6 100755
--- a/terminatorlib/terminal.py
+++ b/terminatorlib/terminal.py
@@ -678,9 +678,9 @@ class Terminal(Gtk.VBox):
             self.bgcolor.parse(self.config['background_color'])
·
         if self.config['background_type'] == 'transparent':
- self.bgcolor.alpha = self.config['background_darkness']
+ self.vte.set_opacity(self.config['background_darkness'])
         else:
- self.bgcolor.alpha = 1
+ self.vte.set_opacity(1)
·
         factor = self.config['inactive_color_offset']
         if factor > 1.0: