From 236ff5c89da90e840acc0becf8efae41fc5b6282 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 11 Jul 2014 21:51:44 -0700 Subject: Printing: make table more useful Tweak font size and column widths. Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 8 ++++++++ qt-ui/printlayout.cpp | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 52ba40d9c..03c95b070 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -1777,6 +1777,14 @@ QVariant TablePrintModel::data(const QModelIndex &index, int role) const case 6: return list.at(index.row())->location; } + if (role == Qt::FontRole) { + QFont font; + font.setPointSizeF(7.5); + if (index.row() == 0 && index.column() == 0) { + font.setBold(true); + } + return QVariant::fromValue(font); + } return QVariant(); } diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index dd23d1004..735e410ab 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -32,9 +32,9 @@ PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct op tablePrintColumnNames.append(tr("Buddy")); tablePrintColumnNames.append(tr("Location")); tablePrintColumnWidths.append(7); - tablePrintColumnWidths.append(10); - tablePrintColumnWidths.append(10); - tablePrintColumnWidths.append(10); + tablePrintColumnWidths.append(14); + tablePrintColumnWidths.append(8); + tablePrintColumnWidths.append(8); tablePrintColumnWidths.append(15); tablePrintColumnWidths.append(15); tablePrintColumnWidths.append(33); -- cgit v1.2.3-70-g09d2