From 971df45055cb99d215a7552288a6aad555138734 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 30 Dec 2019 10:50:25 +0530 Subject: [PATCH] Viewer: Allow setting colors for the margins when creating new color schemes in Preferences->Colors --- src/pyj/read_book/view.pyj | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index cf12217b9c..3276521405 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -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'