comment
This commit is contained in:
parent
6e40db4975
commit
086c0ec5c7
@ -321,6 +321,8 @@ class Display:
|
||||
return
|
||||
|
||||
def draw_qr_display(self, qr_data, msg, is_alnum, sidebar, idx_hint, invert):
|
||||
# 'sidebar' is a pre-formated obj to show to right of QR -- oled life
|
||||
# - 'msg' will appear to right if very short, else under in tiny
|
||||
from utils import word_wrap
|
||||
|
||||
self.clear()
|
||||
@ -362,7 +364,9 @@ class Display:
|
||||
gly = framebuf.FrameBuffer(bytearray(packed), w, w, framebuf.MONO_HLSB)
|
||||
self.dis.blit(gly, XO, YO, 1)
|
||||
|
||||
if not sidebar and len(msg) > (5*7):
|
||||
if not sidebar and not msg:
|
||||
pass
|
||||
elif not sidebar and len(msg) > (5*7):
|
||||
# use FontTiny and word wrap (will just split if no spaces)
|
||||
x = bw + lm + 4
|
||||
ww = ((128 - x)//4) - 1 # char width avail
|
||||
|
||||
Loading…
Reference in New Issue
Block a user