Viewer: Hide the browser provided scrollbar that flashes momentarily on page load. Fixes #1846922 [Scroll bar in new viewer](https://bugs.launchpad.net/calibre/+bug/1846922)

This commit is contained in:
Kovid Goyal 2019-10-06 20:20:57 +05:30
parent 0e8d5d3793
commit d3c0452d6f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -41,9 +41,11 @@ def apply_colors():
document.documentElement.appendChild(ss) document.documentElement.appendChild(ss)
if opts.color_scheme.link: if opts.color_scheme.link:
c = opts.color_scheme.link c = opts.color_scheme.link
ss.textContent = f':link, :link * {{ color: {c} !important }} :visited, :visited * {{ color: {c} !important }}' text = f':link, :link * {{ color: {c} !important }} :visited, :visited * {{ color: {c} !important }}'
else: else:
ss.textContent = '' text = ''
ss.textContent = text + '\n\nhtml::-webkit-scrollbar, body::-webkit-scrollbar { display: none }'
def apply_stylesheet(): def apply_stylesheet():