From 1ab66deb590662155de76c5eee012b44a106c602 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 28 May 2014 23:09:03 +1000 Subject: [PATCH] Make statistics page honour application font setting --- sleepyhead/mainwindow.cpp | 5 ++--- sleepyhead/statistics.cpp | 17 ++++++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 8c98f110..06bf34c1 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -1363,7 +1363,7 @@ void MainWindow::on_actionPrint_Report_triggered() Report::PrintReport(oximetry->graphView(), STR_TR_Oximetry); } } else { - QPrinter printer; + QPrinter printer(QPrinter::HighResolution); #ifdef Q_WS_X11 printer.setPrinterName("Print to File (PDF)"); printer.setOutputFormat(QPrinter::PdfFormat); @@ -1387,8 +1387,7 @@ void MainWindow::on_actionPrint_Report_triggered() printer.setOrientation(QPrinter::Portrait); printer.setFullPage(false); // This has nothing to do with scaling printer.setNumCopies(1); - printer.setPageMargins(10, 10, 10, 10, QPrinter::Millimeter); - + printer.setPageMargins(0, 0, 0, 0, QPrinter::Millimeter); QPrintDialog pdlg(&printer, this); if (pdlg.exec() == QPrintDialog::Accepted) { diff --git a/sleepyhead/statistics.cpp b/sleepyhead/statistics.cpp index a73ad6d4..a007af3b 100644 --- a/sleepyhead/statistics.cpp +++ b/sleepyhead/statistics.cpp @@ -134,8 +134,11 @@ QString htmlHeader() return QString("" "" "