From 3b3a189b03511cd460ffa94dd57e665275b624c0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Dec 2009 11:20:17 -0700 Subject: [PATCH] Fix #3328 (Scroll past page-break to maintain reading flow) --- src/calibre/gui2/viewer/documentview.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/viewer/documentview.py b/src/calibre/gui2/viewer/documentview.py index 3f80f9c154..348b1232ee 100644 --- a/src/calibre/gui2/viewer/documentview.py +++ b/src/calibre/gui2/viewer/documentview.py @@ -343,8 +343,9 @@ class Document(QWebPage): def width(self): return self.mainFrame().contentsSize().width() # offsetWidth gives inaccurate results - def load_finished(self, ok): - self.javascript('$("body").css("padding-bottom: 0px")') + def set_bottom_padding(self, amount): + self.javascript('$("body").css("padding-bottom", "%dpx")' % amount) + class EntityDeclarationProcessor(object): @@ -502,7 +503,7 @@ class DocumentView(QWebView): # An