diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-08-16 14:48:46 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-08-16 14:48:46 (GMT) |
commit | c1a414f10d07c5014c09b7f42f38ce1233d63164 (patch) | |
tree | 59e1bacea94031a90ff89187fe410e57685642d2 /epubview | |
parent | 62dc833def26b48e86738791c659a0466e981744 (diff) |
Apply a default marging to epub pages
This margin improves readability and avoid having the bookmark
over the text.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'epubview')
-rw-r--r-- | epubview/widgets.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epubview/widgets.py b/epubview/widgets.py index 0dd286b..340ff48 100644 --- a/epubview/widgets.py +++ b/epubview/widgets.py @@ -16,7 +16,8 @@ class _WebView(WebKit.WebView): hide_scrollbar_js = \ 'document.documentElement.style.overflow = "hidden";' - js = 'oldtitle=document.title;' + \ + js = 'document.documentElement.style.margin = "50px";' + \ + 'oldtitle=document.title;' + \ 'if (document.body == null) {' + \ 'document.title = 0} else {' + \ hide_scrollbar_js + \ |