Minor layout tweaks with report title

This commit is contained in:
Mark Watkins 2011-12-14 16:58:10 +10:00
parent f186771c21
commit e273a283d3

View File

@ -804,9 +804,9 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date)
QString title=name+" Report";
painter.setFont(*bigfont);
int top=0;
QRectF bounds=painter.boundingRect(QRectF(0,top,printer_width,title_height),title,QTextOption(Qt::AlignHCenter | Qt::AlignTop));
QRectF bounds=painter.boundingRect(QRectF(0,top,printer_width,0),title,QTextOption(Qt::AlignHCenter | Qt::AlignTop));
painter.drawText(bounds,title,QTextOption(Qt::AlignHCenter | Qt::AlignTop));
top+=bounds.height();
top+=bounds.height()+normal_height/2.0;
painter.setFont(*defaultfont);
float printer_dpi=qMax(printer->physicalDpiX(), printer->logicalDpiX());
float screen_dpi=QApplication::desktop()->physicalDpiX();