Bech32 addresses are currently cut off in the QRCode image in the GUI receive tab. This adds a simple font size calculation logic that “must” (down to 4pt) fix into the given image width.
Examples OSX HiDPI:
Examples Ubuntu non HIDPI:
Bech32 addresses are currently cut off in the QRCode image in the GUI receive tab. This adds a simple font size calculation logic that “must” (down to 4pt) fix into the given image width.
Examples OSX HiDPI:
Examples Ubuntu non HIDPI:
182@@ -183,9 +183,19 @@ void ReceiveRequestDialog::update()
183             QPainter painter(&qrAddrImage);
184             painter.drawImage(0, 0, qrImage.scaled(QR_IMAGE_SIZE, QR_IMAGE_SIZE));
185             QFont font = GUIUtil::fixedPitchFont();
186-            font.setPixelSize(12);
187-            painter.setFont(font);
188             QRect paddedRect = qrAddrImage.rect();
189+
190+            // calculate ideal font size
191+            qreal fontSize = 14; // don't go larger then 14 points
187-            painter.setFont(font);
188             QRect paddedRect = qrAddrImage.rect();
189+
190+            // calculate ideal font size
191+            qreal fontSize = 14; // don't go larger then 14 points
192+            while(fontSize > 4) {
while.
              
            font_size (camel case).
              
            Appears to work:
Before:
After:

 0-----BEGIN PGP SIGNED MESSAGE-----
 1Hash: SHA512
 2
 3utACK 59f9e2aaf3fe73961cc02042f929b430fee59f9c
 4-----BEGIN PGP SIGNATURE-----
 5
 6iQIcBAEBCgAGBQJaXRoLAAoJENLqSFDnUoslZLkP/16J05ldrI9MrfutOdhgcDwT
 72+rM4V/8FgiAQ7tSzJGp5BLQ2InvZLCYR+34F7xXmOjJiKkfSjC0AuJA5CmugVed
 8zi67g1v6Z9A21VQd/K0PKL4t1fKfyaL21sGgkQHG6xNayKedthI8ACAyr65GsALr
 9D1YxrcF0NgrbR+djLP6WF6yGJiB3kscVasNENcHDtPAwWf/CddKaSSMfqRTyeZ6I
10GQ57JgGdArndWTrnpSFIVNqT/2ljeVrlQuzQjzL1GKdEgcBcd3NcewLFANBV8ajp
11Wj9Z3F7afO7RG5ySYDzS4o1Kri/cEiarDxkApLzLViiYGo0UMHv1jGL42/h06zzp
12VQTbQHyWy9g+Qr2UoRy89SNWNqZGseV76yLpaAaZzzAEawU3GJ107oZw7f2U5CSL
13KG0Jfn9lI2iJUw2+jRPr4+6kek5+dloBwdU/4w54VKi4c0sHu9oMKVWBo8DU2PhZ
14PM1LZpWBXsWmipAvSkDVgzA+c9/RpXnu0U+XxrNfbbH5XtiE1SJTc4woWMlxG0zH
15jnTGMCTTdxClf4QBA/slG6jsgAVahbg5hUMBeO0d2UAMHWXklNtYALT/2QZfZ7gv
1687IO1QWeBFxStMBuyquOV2L/280hLw10i+fUR58rrcUNWMsvYNib+HcJajCvqoia
17y9MLx0zq84yA6mPJh8Od
18=EswI
19-----END PGP SIGNATURE-----