Mercurial > hg > syntilista
changeset 166:9511e2f250be
Force default page margins for printing, this fixes some problems under Windows.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 19 Sep 2017 13:01:29 +0300 |
parents | 186d0717707f |
children | c54ad71c1205 |
files | src/printing.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/printing.cpp Tue Sep 19 12:25:13 2017 +0300 +++ b/src/printing.cpp Tue Sep 19 13:01:29 2017 +0300 @@ -18,9 +18,10 @@ { // Create a printer object and force some basic settings QPrinter printer(QPrinter::HighResolution); + printer.setResolution(300); printer.setPageSize(QPageSize(QPageSize::A4)); + printer.setPageMargins(QMarginsF(0.25f, 0.5f, 0.25f, 0.5f), QPageLayout::Inch); printer.setColorMode(QPrinter::GrayScale); - printer.setResolution(300); // We need to get the page count here, and also need it again in // printDocument(), but there is no sane way to pass that there,