electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 2f7503c635352826a951dad70e7230bba40f2bd3
parent d0d1b41d636fece05ec0deffcb941a55c963ae21
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:
Mgui/qt/qrcodewidget.py | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gui/qt/qrcodewidget.py b/gui/qt/qrcodewidget.py @@ -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()