From fce00048ef5b35800061e14fffcd2c1b034614de Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sun, 29 Jan 2023 15:47:38 +0100 Subject: [PATCH] Adjust label text size --- src/printerworker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/printerworker.cpp b/src/printerworker.cpp index 93b9fc3..d544a06 100644 --- a/src/printerworker.cpp +++ b/src/printerworker.cpp @@ -769,7 +769,7 @@ void PrinterWorker::convertPlaintextLabel(QString filename, Bytestream header, P QString bigText = "AXgjqÈÅÄÖþ"; QRect rect = fm.boundingRect(bigText); - while(rect.height() > pixelHeight*(14.0/16)) + while(rect.height() > pixelHeight*(8.0/10.0)) { font.setPixelSize(font.pixelSize()-1); fm = QFontMetrics(font); @@ -791,7 +791,7 @@ void PrinterWorker::convertPlaintextLabel(QString filename, Bytestream header, P QPainter painter(&pdfWriter); int xOffset = -rect.x() + pixelHeight/4; - int yOffset = -rect.y() + pixelHeight/16; + int yOffset = -rect.y() + pixelHeight/10; painter.setFont(font); painter.drawText(xOffset, yOffset, allText); painter.end();