You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/core/src/trezor/ui/qr.py

16 lines
398 B

from trezor import ui
class Qr(ui.Component):
def __init__(self, data: str, x: int, y: int, scale: int):
super().__init__()
self.data = data
self.x = x
self.y = y
self.scale = scale
def on_render(self) -> None:
if self.repaint:
ui.display.qrcode(self.x, self.y, self.data.encode(), self.scale)
self.repaint = False