mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ebook viewer: Do not override the background color specified in the book if the user has not set a background color in the viewer preferences
This commit is contained in:
parent
ccc5b092be
commit
945f1be853
@ -126,8 +126,7 @@ class Document(QWebPage): # {{{
|
|||||||
mf.setScrollBarPolicy(Qt.Horizontal, Qt.ScrollBarAlwaysOff)
|
mf.setScrollBarPolicy(Qt.Horizontal, Qt.ScrollBarAlwaysOff)
|
||||||
|
|
||||||
def set_user_stylesheet(self, opts):
|
def set_user_stylesheet(self, opts):
|
||||||
bg = opts.background_color or 'white'
|
brules = ['background-color: %s !important'%opts.background_color] if opts.background_color else ['background-color: white']
|
||||||
brules = ['background-color: %s !important'%bg]
|
|
||||||
prefix = '''
|
prefix = '''
|
||||||
body { %s }
|
body { %s }
|
||||||
'''%('; '.join(brules))
|
'''%('; '.join(brules))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user