Skip to main content

Module qr

Module qr 

Expand description

QR-code widget.

Wraps the qrcode crate and paints the resulting module matrix as a grid of square Vello fills.

  • A configurable “quiet zone” of empty modules wraps the matrix so any consumer scanner accepts the result. Defaults to four modules per the QR spec.
  • No animation, no caching layer. Encoding is a few hundred microseconds for the payload sizes we care about (~200-400 bytes), so re-encoding on every paint keeps the widget declarative (“show this payload”).

The identity-flow ceremony uses this widget to encode both the pairing-channel handshake payload and the tilo://invite/... URL.

Structs§

QrWidget
Holds the source bytes plus the cached encoded matrix. Re-encodes when the payload changes via set_payload — the pairing-channel screen calls it every few seconds as the broker rotates the nonce.

Constants§

DEFAULT_QUIET_MODULES
Default quiet-zone size in modules (the standard requires ≥4).