1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 23:48:12 +00:00

xmr: indeterminate progress for live refresh

This commit is contained in:
Dusan Klinec 2019-04-23 02:07:06 +02:00
parent 9de96f6114
commit 7ea53c089e
No known key found for this signature in database
GPG Key ID: 6337E118CCBCE103

View File

@ -171,5 +171,13 @@ async def live_refresh_step(ctx, current):
return return
ui.display.clear() ui.display.clear()
text = Text("Refreshing", ui.ICON_SEND, icon_color=ui.BLUE) text = Text("Refreshing", ui.ICON_SEND, icon_color=ui.BLUE)
text.normal("%d" % current)
text.render() text.render()
step = 6
p = int(1000.0 * (current / step)) % 1000
if p == 0 and current > 0:
p = 1000
ui.display.loader(p, 18, ui.WHITE, ui.BG, None, 0, 1000 // step)
ui.display.text_center(ui.WIDTH // 2, 145, "%d" % current, ui.NORMAL, ui.FG, ui.BG)
ui.display.refresh()