mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Printing: hide scrollbar from QWebview to fix padding issue
The vertical scrollbar was causing a default margin at the right most of the page which corrupted the page layout calculations. By hidding the vertical scrollbar the issue is fixed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
This commit is contained in:
parent
dc56d1fa54
commit
636c26feed
1 changed files with 1 additions and 0 deletions
|
@ -149,6 +149,7 @@ void Printer::print()
|
|||
pageSize.setHeight(printerPtr->pageRect(QPrinter::Inch).height() * dpi);
|
||||
pageSize.setWidth(printerPtr->pageRect(QPrinter::Inch).width() * dpi);
|
||||
webView->page()->setViewportSize(pageSize);
|
||||
webView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
|
||||
webView->setHtml(t.generate());
|
||||
if (printOptions->color_selected && printerPtr->colorMode()) {
|
||||
printerPtr->setColorMode(QPrinter::Color);
|
||||
|
|
Loading…
Reference in a new issue