mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
CS: Fix cover thumbnails in the book list on high DPI displays
This commit is contained in:
parent
54aaebe8be
commit
fa85e21967
@ -181,7 +181,7 @@ class BooksView:
|
|||||||
set_css(div, border='dashed 1px currentColor', border_radius='10px')
|
set_css(div, border='dashed 1px currentColor', border_radius='10px')
|
||||||
|
|
||||||
def cover_grid_item(self, book_id):
|
def cover_grid_item(self, book_id):
|
||||||
cover_url = 'get/thumb/{}/{}?sz={}x{}'.format(book_id, self.interface_data['library_id'], THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT)
|
cover_url = 'get/thumb/{}/{}?sz={}x{}'.format(book_id, self.interface_data['library_id'], Math.ceil(THUMBNAIL_MAX_WIDTH*window.devicePixelRatio), Math.ceil(THUMBNAIL_MAX_HEIGHT*window.devicePixelRatio))
|
||||||
metadata = self.interface_data['metadata'][book_id]
|
metadata = self.interface_data['metadata'][book_id]
|
||||||
alt = _('{} by {}').format(metadata['title'], metadata['authors'].join(' & '))
|
alt = _('{} by {}').format(metadata['title'], metadata['authors'].join(' & '))
|
||||||
img = E.img(src=cover_url, alt=alt, title=alt, data_title=metadata['title'], data_authors=metadata['authors'].join(' & '),
|
img = E.img(src=cover_url, alt=alt, title=alt, data_title=metadata['title'], data_authors=metadata['authors'].join(' & '),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user