mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Qt comments editor add a margin for floating images Qt itself doesnt render it but it is rendered in the server
This commit is contained in:
parent
b072a49193
commit
4c61274d09
@ -213,6 +213,13 @@ def cleanup_qt_markup(root):
|
||||
if ts:
|
||||
remove_margins(li, ts)
|
||||
remove_zero_indents(ts)
|
||||
for img in root.xpath('//img[@style]'):
|
||||
s = style_map.get(img)
|
||||
if s:
|
||||
if s == {'float': 'left'}:
|
||||
s['margin-right'] = '0.5em'
|
||||
elif s == {'float': 'right'}:
|
||||
s['margin-left'] = '0.5em'
|
||||
for style in itervalues(style_map):
|
||||
filter_qt_styles(style)
|
||||
fw = style.get('font-weight')
|
||||
|
Loading…
x
Reference in New Issue
Block a user