Fix transparency for newer versions of GTK
This commit is contained in:
parent
e3323e23e3
commit
d9c6c9c496
|
@ -372,19 +372,26 @@ 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
|
|
||||||
|
css = """
|
||||||
|
.terminator-terminal-window {
|
||||||
|
background-color: rgba(0,0,0,0);
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
if self.config['handle_size'] in xrange(0, 6):
|
if self.config['handle_size'] in xrange(0, 6):
|
||||||
css = """
|
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.load_from_data(css)
|
self.style_provider = Gtk.CssProvider()
|
||||||
Gtk.StyleContext.add_provider_for_screen(
|
self.style_provider.load_from_data(css)
|
||||||
Gdk.Screen.get_default(),
|
Gtk.StyleContext.add_provider_for_screen(
|
||||||
self.style_provider,
|
Gdk.Screen.get_default(),
|
||||||
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
|
self.style_provider,
|
||||||
|
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
|
||||||
|
|
||||||
# Cause all the terminals to reconfigure
|
# Cause all the terminals to reconfigure
|
||||||
for terminal in self.terminals:
|
for terminal in self.terminals:
|
||||||
|
|
|
@ -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