mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Since we can set the user agent font size in the standalone viewer, use that instead of overriding the font size of <html>
This commit is contained in:
parent
15a512f3c8
commit
9448bf3537
@ -463,9 +463,9 @@ class WebView(RestartingWebEngineView):
|
||||
elif key != '*':
|
||||
sd = vprefs['session_data']
|
||||
sd[key] = val
|
||||
if key == 'standalone_font_settings':
|
||||
apply_font_settings(self._page)
|
||||
vprefs['session_data'] = sd
|
||||
if key in ('standalone_font_settings', 'base_font_size'):
|
||||
apply_font_settings(self._page)
|
||||
|
||||
def do_callback(self, func_name, callback):
|
||||
cid = next(self.callback_id_counter)
|
||||
|
@ -3,6 +3,7 @@
|
||||
from __python__ import hash_literals
|
||||
|
||||
from elementmaker import E
|
||||
from read_book.globals import runtime
|
||||
|
||||
opts = {}
|
||||
|
||||
@ -19,6 +20,7 @@ update_settings()
|
||||
|
||||
|
||||
def apply_font_size():
|
||||
if not runtime.is_standalone_viewer:
|
||||
document.documentElement.style.fontSize = '{}px'.format(opts.base_font_size)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user