From 40e91596fb87f4f6064f06de6b5de02ced17f02c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 11 Sep 2020 19:58:21 +0530 Subject: [PATCH] Fix #1895287 [[Enhancement] Covers that do not fill the area are displayed at the bottom of the content server's cover grid](https://bugs.launchpad.net/calibre/+bug/1895287) --- src/pyj/book_list/cover_grid.pyj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pyj/book_list/cover_grid.pyj b/src/pyj/book_list/cover_grid.pyj index 2a29abe287..cd34f37a1d 100644 --- a/src/pyj/book_list/cover_grid.pyj +++ b/src/pyj/book_list/cover_grid.pyj @@ -14,9 +14,11 @@ THUMBNAIL_MIN_WIDTH = 3 * 35 THUMBNAIL_MIN_HEIGHT = 4 * 35 BORDER_RADIUS = 10 + def description(): return _('A grid of book covers') + def cover_grid_css(): sel = '.' + COVER_GRID_CLASS margin, margin_unit = 10, 'px' @@ -26,7 +28,7 @@ def cover_grid_css(): # Container for an individual cover sel += ' > a' ans += build_rule( - sel, margin=f'{margin}{margin_unit}', display='flex', align_content='flex-end', align_items='flex-end', justify_content='space-around', + sel, margin=f'{margin}{margin_unit}', display='flex', align_content='flex-end', align_items='center', justify_content='space-around', max_width=THUMBNAIL_MAX_WIDTH+'px', max_height=THUMBNAIL_MAX_HEIGHT+'px', cursor='pointer', min_width=THUMBNAIL_MIN_WIDTH+'px', min_height=THUMBNAIL_MIN_HEIGHT + 'px') mq = '@media all and (orientation: {orient}) {{ {sel} {{ width: 21{dim}; height: 28{dim} }} }}\n'