mirror of
https://github.com/leozide/leocad
synced 2024-11-17 07:47:55 +01:00
Fixed print font size.
This commit is contained in:
parent
eae50b6836
commit
62ff114279
1 changed files with 4 additions and 5 deletions
|
@ -1049,15 +1049,14 @@ void lcMainWindow::Print(QPrinter* Printer)
|
|||
|
||||
// if (print text)
|
||||
{
|
||||
QFont Font("Helvetica", Printer->resolution());
|
||||
QFont Font("Helvetica", 96);
|
||||
Painter.setFont(Font);
|
||||
|
||||
QFontMetrics FontMetrics(Font);
|
||||
|
||||
int TextTop = Rect.top() + Printer->resolution() / 2 + FontMetrics.ascent();
|
||||
int TextLeft = Rect.left() + Printer->resolution() / 2;
|
||||
|
||||
Painter.drawText(TextLeft, TextTop, QString::number(Step));
|
||||
int TextMargin = Printer->resolution() / 2;
|
||||
QRect TextRect = Rect.marginsRemoved(QMargins(TextMargin, TextMargin, TextMargin, TextMargin));
|
||||
Painter.drawText(TextRect, Qt::AlignTop | Qt::AlignLeft, QString::number(Step));
|
||||
}
|
||||
|
||||
// if (print border)
|
||||
|
|
Loading…
Reference in a new issue