mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix selection popup bar sometimes going off screen when dragging up to the top line of text. Fixes #1915685 [ebook-viewer: Selection dialog may render partway off-screen](https://bugs.launchpad.net/calibre/+bug/1915685)
This commit is contained in:
parent
6e73715533
commit
dc9a13864b
@ -751,7 +751,7 @@ class SelectionBar:
|
||||
has_space_below = end.y + end.height < container.offsetHeight - bar_height - buffer
|
||||
put_below = has_space_below
|
||||
else:
|
||||
has_space_above = end.y + bar_height - buffer > 0
|
||||
has_space_above = end.y - bar_height - buffer > 0
|
||||
put_below = not has_space_above
|
||||
top = place_vertically(end.y + end.height if put_below else end.y, put_below)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user