Fix transparency for newer versions of GTK
This commit is contained in:
parent
e3323e23e3
commit
d9c6c9c496
|
@ -372,13 +372,20 @@ class Terminator(Borg):
|
||||||
Gtk.StyleContext.remove_provider_for_screen(
|
Gtk.StyleContext.remove_provider_for_screen(
|
||||||
Gdk.Screen.get_default(),
|
Gdk.Screen.get_default(),
|
||||||
self.style_provider)
|
self.style_provider)
|
||||||
self.style_provider = None
|
|
||||||
if self.config['handle_size'] in xrange(0, 6):
|
|
||||||
css = """
|
css = """
|
||||||
|
.terminator-terminal-window {
|
||||||
|
background-color: rgba(0,0,0,0);
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
if self.config['handle_size'] in xrange(0, 6):
|
||||||
|
css += """
|
||||||
GtkPaned {
|
GtkPaned {
|
||||||
-GtkPaned-handle-size: %s
|
-GtkPaned-handle-size: %s
|
||||||
}
|
}
|
||||||
""" % self.config['handle_size']
|
""" % self.config['handle_size']
|
||||||
|
|
||||||
self.style_provider = Gtk.CssProvider()
|
self.style_provider = Gtk.CssProvider()
|
||||||
self.style_provider.load_from_data(css)
|
self.style_provider.load_from_data(css)
|
||||||
Gtk.StyleContext.add_provider_for_screen(
|
Gtk.StyleContext.add_provider_for_screen(
|
||||||
|
|
|
@ -64,6 +64,8 @@ class Window(Container, Gtk.Window):
|
||||||
GObject.type_register(Window)
|
GObject.type_register(Window)
|
||||||
self.register_signals(Window)
|
self.register_signals(Window)
|
||||||
|
|
||||||
|
self.get_style_context().add_class("terminator-terminal-window")
|
||||||
|
|
||||||
# self.set_property('allow-shrink', True) # FIXME FOR GTK3, or do we need this actually?
|
# self.set_property('allow-shrink', True) # FIXME FOR GTK3, or do we need this actually?
|
||||||
icon_to_apply=''
|
icon_to_apply=''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue