From b757b415619f41e1f0cc6ec1db9c854c0c108f1e Mon Sep 17 00:00:00 2001 From: Ryan McGuire Date: Fri, 17 May 2013 12:40:51 -0400 Subject: [PATCH] Fixes the QR code widget to include a 10px margin to offset the widget on dark theme background. --- gui/qrcodewidget.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/qrcodewidget.py b/gui/qrcodewidget.py index bd8fbb423..662be594e 100644 --- a/gui/qrcodewidget.py +++ b/gui/qrcodewidget.py @@ -62,6 +62,11 @@ class QRCodeWidget(QWidget): left = (r.width() - size)/2 top = (r.height() - size)/2 + # Make a white margin around the QR in case of dark theme use: + margin = 10 + qp.setBrush(white) + qp.drawRect(left-margin, top-margin, size+(margin*2), size+(margin*2)) + for r in range(k): for c in range(k): if self.qr.isDark(r, c):