mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 18:45:20 -04:00
When calculating body font size clear cache if window.devicePixelRatio changes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user