mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix points at the right edge of the column being identified as belonging to the next column in paged mode
This commit is contained in:
parent
603b9b70ff
commit
6141113d5b
@ -91,7 +91,9 @@ def column_at(pos):
|
|||||||
si = scroll_viewport.paged_content_inline_size()
|
si = scroll_viewport.paged_content_inline_size()
|
||||||
if pos >= si - col_and_gap:
|
if pos >= si - col_and_gap:
|
||||||
pos = si - col_size + 10
|
pos = si - col_size + 10
|
||||||
return (pos + gap) // col_and_gap
|
# we subtract 1 here so that a point at the absolute trailing (right in
|
||||||
|
# horz-LTR) edge of a column remains in the column and not at the next column
|
||||||
|
return max(0, (pos + gap - 1)) // col_and_gap
|
||||||
|
|
||||||
def fit_images():
|
def fit_images():
|
||||||
# Ensure no images are wider than the available size of a column. Note
|
# Ensure no images are wider than the available size of a column. Note
|
||||||
|
Loading…
x
Reference in New Issue
Block a user