tMerge pull request #1253 from kyuupichan/fast_qr_draw - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 2f7503c635352826a951dad70e7230bba40f2bd3 (DIR) parent d0d1b41d636fece05ec0deffcb941a55c963ae21 (HTM) Author: ThomasV <electrumdev@gmail.com> Date: Wed, 27 May 2015 10:27:28 +0200 Merge pull request #1253 from kyuupichan/fast_qr_draw Speed up painting of qr codes. Diffstat: M gui/qt/qrcodewidget.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- (DIR) diff --git a/gui/qt/qrcodewidget.py b/gui/qt/qrcodewidget.py t@@ -72,16 +72,13 @@ class QRCodeWidget(QWidget): qp.setBrush(white) qp.setPen(white) qp.drawRect(left-margin, top-margin, size+(margin*2), size+(margin*2)) + qp.setBrush(black) + qp.setPen(black) for r in range(k): for c in range(k): if matrix[r][c]: - qp.setBrush(black) - qp.setPen(black) - else: - qp.setBrush(white) - qp.setPen(white) - qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize, boxsize) + qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize - 1, boxsize - 1) qp.end()