From d837ac40c62bf5f30ac17e1d587f35f3e1dfc93e Mon Sep 17 00:00:00 2001
From: Gregory Sanders <gsanders87@gmail.com>
Date: Tue, 19 Nov 2019 10:47:59 -0500
Subject: [PATCH] Fix QR address display for blinded base58 addrs

---
 src/qt/receiverequestdialog.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp
index de9410899b..40a27bcf61 100644
--- a/src/qt/receiverequestdialog.cpp
+++ b/src/qt/receiverequestdialog.cpp
@@ -188,10 +188,13 @@ void ReceiveRequestDialog::update()
                 split_address.insert((chars_per_line * i) + i, '\n');
             }
 
-            QImage qrAddrImage = QImage(QR_IMAGE_SIZE, QR_IMAGE_SIZE + 16 + fm.height(), QImage::Format_RGB32);
+            // Elements: Hack to get QR address to print right
+            const size_t MORE_WIDTH = 80;
+
+            QImage qrAddrImage = QImage(QR_IMAGE_SIZE + MORE_WIDTH, QR_IMAGE_SIZE + 16 + fm.height(), QImage::Format_RGB32);
             qrAddrImage.fill(0xffffff);
             QPainter painter(&qrAddrImage);
-            painter.drawImage(0, 0, qrImage.scaled(QR_IMAGE_SIZE, QR_IMAGE_SIZE));
+            painter.drawImage(MORE_WIDTH/2, 0, qrImage.scaled(QR_IMAGE_SIZE, QR_IMAGE_SIZE));
             QRect paddedRect = qrAddrImage.rect();
             paddedRect.setHeight(QR_IMAGE_SIZE + 8 + fm.height());
             painter.drawText(paddedRect, Qt::AlignBottom | Qt::AlignCenter | Qt::TextWordWrap, split_address);