E-book viewer: Fix cover and full screen images not centered in paged mode when more than one page is displayed per screen.

This commit is contained in:
Kovid Goyal 2021-10-12 08:18:43 +05:30
parent 9197b55d72
commit 2d074400e2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -329,6 +329,12 @@ def layout(is_single_page, on_resize):
is_full_screen_layout = True
if has_svg and svgs.length == 1 and svgs[0].getBoundingClientRect().left < wi:
is_full_screen_layout = True
if is_full_screen_layout and only_img and cols_per_screen > 1:
cols_per_screen = 1
col_size = screen_inline
col_and_gap = col_size + gap
number_of_cols = 1
document.body.style.columnWidth = f'100vw'
# Some browser engine, WebKit at least, adjust column sizes to please
# themselves, unless the container size is an exact multiple, so we check