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:
parent
0a2c1a627f
commit
1277464c73
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue