mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fixed Pageup Occasionally Failing
Before, pageup failed when the page margins were greater than half the screen width, because previous_screen_location() went backward by screen_inline, which did not account for the margins but worked most of the time due to later rounding. Now this has been fixed. Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
This commit is contained in:
parent
87b85cac39
commit
501d6d0cf2
@ -453,7 +453,7 @@ def previous_screen_location():
|
|||||||
if is_full_screen_layout:
|
if is_full_screen_layout:
|
||||||
return -1
|
return -1
|
||||||
cc = current_column_location()
|
cc = current_column_location()
|
||||||
ans = cc - screen_inline
|
ans = cc - cols_per_screen * col_and_gap
|
||||||
if ans < 0:
|
if ans < 0:
|
||||||
# We ignore small scrolls (less than 15px) when going to previous
|
# We ignore small scrolls (less than 15px) when going to previous
|
||||||
# screen
|
# screen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user