From 945f1be8534063c0d278ed1b4aef8e444e3719c8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 22 Jan 2014 17:28:03 +0530 Subject: [PATCH] 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 --- src/calibre/gui2/viewer/documentview.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/gui2/viewer/documentview.py b/src/calibre/gui2/viewer/documentview.py index cead396c59..7dc7f7b809 100644 --- a/src/calibre/gui2/viewer/documentview.py +++ b/src/calibre/gui2/viewer/documentview.py @@ -126,8 +126,7 @@ class Document(QWebPage): # {{{ mf.setScrollBarPolicy(Qt.Horizontal, Qt.ScrollBarAlwaysOff) def set_user_stylesheet(self, opts): - bg = opts.background_color or 'white' - brules = ['background-color: %s !important'%bg] + brules = ['background-color: %s !important'%opts.background_color] if opts.background_color else ['background-color: white'] prefix = ''' body { %s } '''%('; '.join(brules))