Followup to rev. 1722 to stop panes nudging on performing a normal split due to the ratio float not accounting for the handle size.

This commit is contained in:
Stephen Boddy 2017-02-10 06:45:40 +01:00
parent 0a2c1a627f
commit 1277464c73

View File

@ -477,7 +477,7 @@ class Paned(Container):
return int(round(non_separator_size * ratio))
def ratio_by_position(self, total_size, handle_size, position):
non_separator_size = max(total_size, handle_size, 0)
non_separator_size = max(total_size - handle_size, 0)
if non_separator_size == 0:
return None
position = min(max(position, 0), non_separator_size)