From 93724ba33a6d6601efd0fee571863fa2d8a3a460 Mon Sep 17 00:00:00 2001 From: zebra-lucky Date: Sat, 10 Aug 2019 03:18:15 +0300 Subject: [PATCH] qt gui: fix qrcodewidget pen for retina display --- electrum/gui/qt/qrcodewidget.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qt/qrcodewidget.py b/electrum/gui/qt/qrcodewidget.py index 4e08e5db1..bae208c83 100644 --- a/electrum/gui/qt/qrcodewidget.py +++ b/electrum/gui/qt/qrcodewidget.py @@ -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]: