1
0

Use screen size as upper bound for qr code size

also fix some typing issues
This commit is contained in:
Sander van Grieken
2022-06-14 17:24:50 +02:00
parent 486ef414af
commit d3e88064d0
4 changed files with 13 additions and 10 deletions

View File

@@ -153,7 +153,9 @@ class ElectrumQmlApplication(QGuiApplication):
self.engine = QQmlApplicationEngine(parent=self)
self.engine.addImportPath('./qml')
self.qr_ip = QEQRImageProvider()
screensize = self.primaryScreen().size()
self.qr_ip = QEQRImageProvider((7/8)*min(screensize.width(), screensize.height()))
self.engine.addImageProvider('qrgen', self.qr_ip)
# add a monospace font as we can't rely on device having one