Fix for slightly off-center splits.
This commit is contained in:
parent
ab6eae90e6
commit
a6e72c1d63
|
@ -386,7 +386,8 @@ class Paned(Container):
|
||||||
self.set_position(self.get_position())
|
self.set_position(self.get_position())
|
||||||
|
|
||||||
def set_position_by_ratio(self):
|
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):
|
def set_position(self, pos):
|
||||||
self.ratio = float(pos) / self.get_length()
|
self.ratio = float(pos) / self.get_length()
|
||||||
|
|
Loading…
Reference in New Issue