mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
When calculating body font size clear cache if window.devicePixelRatio changes
This commit is contained in:
parent
bd10c248a0
commit
88f5310317
@ -163,7 +163,9 @@ def show_controls_help():
|
||||
|
||||
def body_font_size():
|
||||
ans = body_font_size.ans
|
||||
if not ans:
|
||||
dpr = body_font_size.dpr
|
||||
if not ans or window.devicePixelRatio is not dpr:
|
||||
body_font_size.dpr = window.devicePixelRatio
|
||||
q = window.getComputedStyle(document.body).fontSize
|
||||
if q and q.endsWith('px'):
|
||||
q = parseInt(q)
|
||||
|
Loading…
x
Reference in New Issue
Block a user