mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Merge pull request #5550 from zebra-lucky/fix_qt_gui_qrcodewidget_pen
qt gui: fix qrcodewidget pen for retina display
This commit is contained in:
commit
9eebb306f2
1 changed files with 5 additions and 2 deletions
|
@ -1,8 +1,9 @@
|
|||
import os
|
||||
import qrcode
|
||||
|
||||
from PyQt5.QtGui import QColor
|
||||
from PyQt5.QtGui import QColor, QPen
|
||||
import PyQt5.QtGui as QtGui
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import (
|
||||
QApplication, QVBoxLayout, QTextEdit, QHBoxLayout, QPushButton, QWidget)
|
||||
|
||||
|
@ -48,6 +49,8 @@ class QRCodeWidget(QWidget):
|
|||
|
||||
black = QColor(0, 0, 0, 255)
|
||||
white = QColor(255, 255, 255, 255)
|
||||
black_pen = QPen(black)
|
||||
black_pen.setJoinStyle(Qt.MiterJoin)
|
||||
|
||||
if not self.qr:
|
||||
qp = QtGui.QPainter()
|
||||
|
@ -77,7 +80,7 @@ class QRCodeWidget(QWidget):
|
|||
qp.drawRect(0, 0, framesize, framesize)
|
||||
# Draw qr code
|
||||
qp.setBrush(black)
|
||||
qp.setPen(black)
|
||||
qp.setPen(black_pen)
|
||||
for r in range(k):
|
||||
for c in range(k):
|
||||
if matrix[r][c]:
|
||||
|
|
Loading…
Add table
Reference in a new issue