From 88b1e09dee7b78f1bd4fba40e75b619e6d8067df Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 15 Oct 2013 12:54:17 +0300 Subject: printlayout.cpp: Increase the font size in tables bellow profile Because of varying font (screen) DPI we use pixel sized fonts when printing. Apparently 8px does not look that good on Windows default fonts, but kinda OK on Linux. We compensate by increasing the font size and table rows to 9px. Also decrease the padding between the table and profile to 5px. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 2 +- qt-ui/printlayout.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index df2732cc4..7ea056300 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -1590,7 +1590,7 @@ QVariant ProfilePrintModel::data(const QModelIndex &index, int role) const } case Qt::FontRole: { QFont font; - const int baseSize = 8; + const int baseSize = 9; // dive # if (row == 0 && col == 0) { font.setBold(true); diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index d0f3f16da..0c18213e1 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -44,7 +44,7 @@ PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct op profilePrintColumnWidths.append(dw - 5); profilePrintColumnWidths.append(dw + 5); profilePrintColumnWidths.append(dw - 5); // fit to 100% - const int sr = 8; // smallest row height in pixels + const int sr = 9; // smallest row height in pixels profilePrintRowHeights.append(sr + 2); profilePrintRowHeights.append(sr + 7); profilePrintRowHeights.append(sr); @@ -133,7 +133,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn) const int scaledW = ESTIMATE_DIVE_DIM(scaledPageW, divesPerColumn, padW); const int scaledH = ESTIMATE_DIVE_DIM(scaledPageH, divesPerRow, padH); // padding in pixels between profile and table - const int padPT = 10; + const int padPT = 5; // create a model and table ProfilePrintModel model; QTableView *table = createProfileTable(&model, scaledW); -- cgit v1.2.3-70-g09d2