mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Set background color on ifrae rather than iframe contents
This commit is contained in:
parent
0ed3a5e636
commit
d35e5c78ed
@ -29,7 +29,9 @@ def apply_font_size():
|
||||
def apply_colors():
|
||||
for elem in (document.documentElement, document.body):
|
||||
elem.style.color = opts.color_scheme.foreground
|
||||
elem.style.backgroundColor = opts.color_scheme.background
|
||||
# set background color to transparent so that the users background
|
||||
# color which is set on the iframe is used instead
|
||||
elem.style.backgroundColor = 'transparent'
|
||||
ss = document.getElementById('calibre-color-scheme-style-overrides')
|
||||
if not ss:
|
||||
ss = E.style(id='calibre-color-scheme-style-overrides', type='text/css')
|
||||
|
@ -435,6 +435,7 @@ class View:
|
||||
s = m.style
|
||||
s.color = ans.foreground
|
||||
s.backgroundColor = ans.background
|
||||
self.iframe.style.backgroundColor = ans.background or 'white'
|
||||
m.parentNode.style.backgroundColor = ans.background # this is needed on iOS where the bottom margin has its own margin, so we dont want the body background color to bleed through
|
||||
self.content_popup_overlay.apply_color_scheme(ans.background, ans.foreground)
|
||||
return ans
|
||||
|
Loading…
x
Reference in New Issue
Block a user