Fix separator sizing

This commit is contained in:
Stephen Boddy 2015-11-28 20:03:51 +01:00
parent 9fa9c0e45a
commit 73ba77ee5e
1 changed files with 16 additions and 6 deletions

View File

@ -39,6 +39,7 @@ class Terminator(Borg):
groups = None
config = None
keybindings = None
style_provider = None
origcwd = None
dbus_path = None
@ -363,14 +364,23 @@ class Terminator(Borg):
def reconfigure(self):
"""Update configuration for the whole application"""
if self.style_provider is not None:
Gtk.StyleContext.remove_provider_for_screen(
Gdk.Screen.get_default(),
self.style_provider)
self.style_provider = None
if self.config['handle_size'] in xrange(0, 6):
Gtk.rc_parse_string("""
style "terminator-paned-style" {
GtkPaned::handle_size = %s
css = """
GtkPaned {
-GtkPaned-handle-size: %s
}
class "GtkPaned" style "terminator-paned-style"
""" % self.config['handle_size'])
Gtk.rc_reset_styles(Gtk.Settings.get_default())
""" % self.config['handle_size']
self.style_provider = Gtk.CssProvider()
self.style_provider.load_from_data(css)
Gtk.StyleContext.add_provider_for_screen(
Gdk.Screen.get_default(),
self.style_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
# Cause all the terminals to reconfigure
for terminal in self.terminals: