From 73ba77ee5e1b50106d29ba264834f881e2d8f546 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sat, 28 Nov 2015 20:03:51 +0100 Subject: [PATCH] Fix separator sizing --- terminatorlib/terminator.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 7013f0e5..ad87f705 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -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: