From a6e72c1d63cbbaa4e676184346bd7c94ac795cfe Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Thu, 13 Dec 2012 18:07:18 +0100 Subject: [PATCH] Fix for slightly off-center splits. --- terminatorlib/paned.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/terminatorlib/paned.py b/terminatorlib/paned.py index 22259b4f..17ef13ea 100755 --- a/terminatorlib/paned.py +++ b/terminatorlib/paned.py @@ -386,7 +386,8 @@ class Paned(Container): self.set_position(self.get_position()) def set_position_by_ratio(self): - self.set_pos(int(self.ratio*self.get_length())) + handle_size = self.style_get_property('handle-size') + self.set_pos(int((self.ratio*self.get_length())-(handle_size/2.0))) def set_position(self, pos): self.ratio = float(pos) / self.get_length()