mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
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)
This commit is contained in:
parent
fc980d13a4
commit
40e91596fb
@ -14,9 +14,11 @@ THUMBNAIL_MIN_WIDTH = 3 * 35
|
|||||||
THUMBNAIL_MIN_HEIGHT = 4 * 35
|
THUMBNAIL_MIN_HEIGHT = 4 * 35
|
||||||
BORDER_RADIUS = 10
|
BORDER_RADIUS = 10
|
||||||
|
|
||||||
|
|
||||||
def description():
|
def description():
|
||||||
return _('A grid of book covers')
|
return _('A grid of book covers')
|
||||||
|
|
||||||
|
|
||||||
def cover_grid_css():
|
def cover_grid_css():
|
||||||
sel = '.' + COVER_GRID_CLASS
|
sel = '.' + COVER_GRID_CLASS
|
||||||
margin, margin_unit = 10, 'px'
|
margin, margin_unit = 10, 'px'
|
||||||
@ -26,7 +28,7 @@ def cover_grid_css():
|
|||||||
# Container for an individual cover
|
# Container for an individual cover
|
||||||
sel += ' > a'
|
sel += ' > a'
|
||||||
ans += build_rule(
|
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',
|
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')
|
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'
|
mq = '@media all and (orientation: {orient}) {{ {sel} {{ width: 21{dim}; height: 28{dim} }} }}\n'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user