mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Fix a regression, caused by a Qt 5 behavior change, that caused incorrect colors to be shown when viewing MOBI files that use CSS 3 color specifications internally.
This commit is contained in:
parent
e878b52c99
commit
384542e030
@ -513,6 +513,11 @@ class MobiReader(object):
|
||||
'div' and 'filepos-id' in attrib):
|
||||
pagebreak_anchors.append(tag)
|
||||
|
||||
if 'color' in attrib:
|
||||
styles.append('color: ' + attrib.pop('color'))
|
||||
if 'bgcolor' in attrib:
|
||||
styles.append('background-color: ' + attrib.pop('bgcolor'))
|
||||
|
||||
if 'filepos-id' in attrib:
|
||||
attrib['id'] = attrib.pop('filepos-id')
|
||||
if 'name' in attrib and attrib['name'] != attrib['id']:
|
||||
|
Loading…
x
Reference in New Issue
Block a user