From f479a68ccd3509918a7ce0647c5294882e20fa73 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Thu, 15 Dec 2016 19:41:20 +0000 Subject: [PATCH] Calculate correct size of Maxicode in GUI --- backend_qt/qzint.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp index c81560fe..d0069eb1 100644 --- a/backend_qt/qzint.cpp +++ b/backend_qt/qzint.cpp @@ -316,6 +316,7 @@ namespace Zint { fontLarge.setPixelSize(fontPixelSizeLarge); if (m_lastError.length()) { + fontLarge.setPointSize(14); painter.setFont(fontLarge); painter.drawText(paintRect, Qt::AlignCenter, m_lastError); return; @@ -346,10 +347,8 @@ namespace Zint { qreal gwidth = m_zintSymbol->width; qreal gheight = m_zintSymbol->height; if (m_zintSymbol->symbology == BARCODE_MAXICODE) { - gheight *= (maxi_width); - gwidth *= (maxi_width + 1); - gwidth *= 2.0; - gheight *= 2.0; + gwidth = (33.0 * maxi_width) + xoffset + xoffset; + gheight = (32.0 * maxi_width) + yoffset + yoffset; } if (m_zintSymbol->output_options & BARCODE_DOTTY_MODE) {