diff --git a/src/pyj/read_book/overlay.pyj b/src/pyj/read_book/overlay.pyj
index d22798b89b..118dd1bd16 100644
--- a/src/pyj/read_book/overlay.pyj
+++ b/src/pyj/read_book/overlay.pyj
@@ -25,12 +25,14 @@
class LoadingMessage: # {{{
- def __init__(self, msg):
+ def __init__(self, msg, current_color_scheme):
self.msg = msg or ''
+ self.current_color_scheme = current_color_scheme
def show(self, container):
self.container_id = container.getAttribute('id')
- container.style.backgroundColor = get_color('window-background')
+ container.style.backgroundColor = self.current_color_scheme.background
+ container.style.color = self.current_color_scheme.foreground
container.appendChild(
E.div(
style='text-align:center',
@@ -500,7 +502,7 @@ def container_clicked(self, evt):
self.hide_current_panel()
def show_loading_message(self, msg):
- lm = LoadingMessage(msg)
+ lm = LoadingMessage(msg, self.view.current_color_scheme)
self.panels.push(lm)
self.show_current_panel()
diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj
index 61621c6cc1..413f2669b0 100644
--- a/src/pyj/read_book/view.pyj
+++ b/src/pyj/read_book/view.pyj
@@ -191,6 +191,7 @@ def __init__(self, container):
entry_point = None if runtime.is_standalone_viewer else 'read_book.iframe'
if runtime.is_standalone_viewer:
document.documentElement.addEventListener('keydown', self.handle_keypress, {'passive': False})
+ self.current_color_scheme = resolve_color_scheme()
self.iframe_wrapper = IframeWrapper(handlers, document.getElementById(iframe_id), entry_point, _('Bootstrapping book reader...'), runtime.FAKE_PROTOCOL, runtime.FAKE_HOST)
self.search_overlay = SearchOverlay(self)
self.content_popup_overlay = ContentPopupOverlay(self)
@@ -418,6 +419,7 @@ def on_iframe_error(self, data):
def get_color_scheme(self, apply_to_margins):
ans = resolve_color_scheme()
+ self.current_color_scheme = ans
if apply_to_margins:
for which in 'left top right bottom'.split(' '):
m = document.getElementById('book-{}-margin'.format(which))
@@ -442,7 +444,7 @@ def show_loading(self):
title = self.book.metadata.title
name = self.currently_showing.name
self.show_loading_message(_(
- 'Loading {name} from {title}, please wait...').format(name=name, title=title))
+ 'Loading next section from {title}, please wait...').format(name=name, title=title))
def hide_loading(self):
self.overlay.hide_loading_message()