mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
E-book viewer: In paged mode, fix scrolling not working correctly when margins are set to zero. Fixes #1918105 [back keyboard shortcut not working [solved]](https://bugs.launchpad.net/calibre/+bug/1918105)
This commit is contained in:
parent
f38ac80991
commit
2ad7fdc33f
@ -282,6 +282,8 @@ def layout(is_single_page, on_resize):
|
||||
# the window inline dimension, with their separator margins
|
||||
wi = col_size = screen_inline = scroll_viewport.inline_size()
|
||||
margin_size = (opts.margin_left + opts.margin_right) if scroll_viewport.horizontal_writing_mode else (opts.margin_top + opts.margin_bottom)
|
||||
# a zero margin causes scrolling issues, see https://bugs.launchpad.net/calibre/+bug/1918437
|
||||
margin_size = max(1, margin_size)
|
||||
gap = margin_size
|
||||
if n > 1:
|
||||
# Adjust the margin so that the window inline dimension satisfies
|
||||
|
Loading…
x
Reference in New Issue
Block a user