From 7359b314b3c16d0728efb2c239cc944031e0bdcf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Aug 2020 08:09:30 +0530 Subject: [PATCH] Fix incorrect single screen detection This detection runs on first layout, before columns are created, therefore, the block direction is the appropriate thing to check --- src/pyj/read_book/paged_mode.pyj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pyj/read_book/paged_mode.pyj b/src/pyj/read_book/paged_mode.pyj index 01215e061d..96749bdaa5 100644 --- a/src/pyj/read_book/paged_mode.pyj +++ b/src/pyj/read_book/paged_mode.pyj @@ -203,8 +203,7 @@ def layout(is_single_page, on_resize): handle_rtl_body(body_style) # Check if the current document is a full screen layout like # cover, if so we treat it specially. - # (The inline size is the column direction, so it's the appropriate thing to check to make sure we don't have multiple columns) - single_screen = (scroll_viewport.document_inline_size() < scroll_viewport.inline_size() + 75) + single_screen = (scroll_viewport.document_block_size() < scroll_viewport.block_size() + 75) first_layout = True svgs = document.getElementsByTagName('svg') has_svg = svgs.length > 0