Ensure handles are the same height

This commit is contained in:
Kovid Goyal 2020-08-06 12:31:02 +05:30
parent 1c5fed9e4c
commit eb7bdaca4e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -607,8 +607,8 @@ class SelectionBar:
def place_single_handle(handle, boundary, is_left):
s = handle.style
s.display = 'block' if boundary.onscreen else 'none'
height = boundary.height * 3
width = boundary.height * 2
height = handle_height * 3
width = handle_height * 2
s.width = f'{width}px'
s.height = f'{height}px'
bottom = boundary.y + boundary.height
@ -623,6 +623,7 @@ class SelectionBar:
if not end_after_start:
start, end = end, start
handle_height = max(start.height, end.height)
place_single_handle(left_handle, start, True)
place_single_handle(right_handle, end, False)
# }}}