From 6cf5c845da365805531f674c56174f47888e6aed Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 17 May 2017 16:58:14 +0530 Subject: [PATCH] Fix wide covers being cut-off on the right --- src/calibre/srv/render_book.py | 8 ++++++-- src/pyj/read_book/resources.pyj | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/calibre/srv/render_book.py b/src/calibre/srv/render_book.py index 6756b64c9d..e5fe1d9095 100644 --- a/src/calibre/srv/render_book.py +++ b/src/calibre/srv/render_book.py @@ -239,8 +239,12 @@ class Container(ContainerBase): templ = ''' ''' if input_fmt == 'epub': diff --git a/src/pyj/read_book/resources.pyj b/src/pyj/read_book/resources.pyj index cea712acf1..b8dd57d52a 100644 --- a/src/pyj/read_book/resources.pyj +++ b/src/pyj/read_book/resources.pyj @@ -42,7 +42,7 @@ def load_resources(db, book, root_name, previous_resources, proceed): def got_one(data, name, mimetype): if False and name is book.manifest.title_page_name: # Enable to have cover image not preserve aspect ratio - data = data.replace('width: auto', 'width: 100%') + data = data.replace('width: auto; height: auto', 'width: 100vw; height: 100vh') ans[name] = v'[data, mimetype]' if jstype(data) is 'string': find_virtualized_resources(data)