Skip to content

Commit

Permalink
core: make QR code smaller for Monero
Browse files Browse the repository at this point in the history
  • Loading branch information
tsusanka committed Jul 1, 2020
1 parent 14a8da9 commit 0f9a245
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/apps/common/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ async def show_qr(
) -> bool:
QR_X = const(120)
QR_Y = const(115)
QR_COEF = const(4)
QR_SIZE_THRESHOLD = const(63)
QR_COEF = const(4) if len(address) < QR_SIZE_THRESHOLD else const(3)
qr = Qr(address, QR_X, QR_Y, QR_COEF)
text = Text(desc, ui.ICON_RECEIVE, ui.GREEN)
content = Container(qr, text)
Expand Down

0 comments on commit 0f9a245

Please sign in to comment.