mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 02:05:19 +00:00
Merge pull request #221 from EnigmaCurry/fix-qr-margin
Fixes the QR code widget to include a 10px margin to offset the widget on dark theme background
This commit is contained in:
commit
50ba1faae4
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,11 @@ class QRCodeWidget(QWidget):
|
||||||
left = (r.width() - size)/2
|
left = (r.width() - size)/2
|
||||||
top = (r.height() - 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 r in range(k):
|
||||||
for c in range(k):
|
for c in range(k):
|
||||||
if self.qr.isDark(r, c):
|
if self.qr.isDark(r, c):
|
||||||
|
|
Loading…
Add table
Reference in a new issue