mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
9197b55d72
commit
2d074400e2
@ -329,6 +329,12 @@ def layout(is_single_page, on_resize):
|
|||||||
is_full_screen_layout = True
|
is_full_screen_layout = True
|
||||||
if has_svg and svgs.length == 1 and svgs[0].getBoundingClientRect().left < wi:
|
if has_svg and svgs.length == 1 and svgs[0].getBoundingClientRect().left < wi:
|
||||||
is_full_screen_layout = True
|
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
|
# Some browser engine, WebKit at least, adjust column sizes to please
|
||||||
# themselves, unless the container size is an exact multiple, so we check
|
# themselves, unless the container size is an exact multiple, so we check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user