diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-08-21 10:56:59 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-08-22 18:33:26 +0300 |
commit | 13febc1eee0766801f3d86e0aa413552def76135 (patch) | |
tree | 19ba2ac087b49e03863eae280f06e5f1b0f0adb4 | |
parent | 20c22596f0c8689ec5d63518df2d7ca162b8d8c2 (diff) | |
download | subsurface-13febc1eee0766801f3d86e0aa413552def76135.tar.gz |
Printing: fix uninialized border width
In flow rendering the border width is not initialized which causes
huge borders that blocks the page while previewing.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
-rw-r--r-- | printer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/printer.cpp b/printer.cpp index 624de3a42..b4d937094 100644 --- a/printer.cpp +++ b/printer.cpp @@ -293,6 +293,8 @@ void Printer::previewOnePage() pageSize.setHeight(paintDevice->height()); pageSize.setWidth(paintDevice->width()); webView->page()->setViewportSize(pageSize); + // initialize the border settings + templateOptions->border_width = std::max(1, pageSize.width() / 1000); webView->setHtml(t.generate()); // render only one page |