mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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>
This commit is contained in:
parent
20c22596f0
commit
13febc1eee
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue