mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Allow setting colors for the margins when creating new color schemes in Preferences->Colors
This commit is contained in:
parent
007823983b
commit
971df45055
@ -567,8 +567,12 @@ class View:
|
|||||||
for which in 'left top right bottom'.split(' '):
|
for which in 'left top right bottom'.split(' '):
|
||||||
m = document.getElementById('book-{}-margin'.format(which))
|
m = document.getElementById('book-{}-margin'.format(which))
|
||||||
s = m.style
|
s = m.style
|
||||||
s.color = ans.foreground
|
mc = ans[f'margin_{which}']
|
||||||
s.backgroundColor = ans.background
|
if mc:
|
||||||
|
s.backgroundColor, s.color = mc.split(':')
|
||||||
|
else:
|
||||||
|
s.color = ans.foreground
|
||||||
|
s.backgroundColor = ans.background
|
||||||
sd = get_session_data()
|
sd = get_session_data()
|
||||||
iframe = self.iframe
|
iframe = self.iframe
|
||||||
iframe.style.backgroundColor = ans.background or 'white'
|
iframe.style.backgroundColor = ans.background or 'white'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user