Viewer: Allow setting colors for the margins when creating new color schemes in Preferences->Colors

This commit is contained in:
Kovid Goyal 2019-12-30 10:50:25 +05:30
parent 007823983b
commit 971df45055
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -567,8 +567,12 @@ class View:
for which in 'left top right bottom'.split(' '):
m = document.getElementById('book-{}-margin'.format(which))
s = m.style
s.color = ans.foreground
s.backgroundColor = ans.background
mc = ans[f'margin_{which}']
if mc:
s.backgroundColor, s.color = mc.split(':')
else:
s.color = ans.foreground
s.backgroundColor = ans.background
sd = get_session_data()
iframe = self.iframe
iframe.style.backgroundColor = ans.background or 'white'