mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-13 17:00:59 +00:00
fix trezor.res
This commit is contained in:
parent
7e8e0e3439
commit
c08c4cd386
@ -1,9 +1,9 @@
|
||||
from trezor import ui
|
||||
from trezor.ui.swipe import Swipe
|
||||
from trezor.utils import unimport_gen
|
||||
from trezor.res import loadres
|
||||
from trezor import dispatcher
|
||||
from trezor import loop
|
||||
from trezor import res
|
||||
from trezor import wire
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ def swipe_to_rotate():
|
||||
|
||||
def animate_logo():
|
||||
def func(foreground):
|
||||
ui.display.icon(0, 0, loadres('apps/homescreen/res/trezor.toig'), foreground, ui.BLACK)
|
||||
ui.display.icon(0, 0, res.load('apps/homescreen/res/trezor.toig'), foreground, ui.BLACK)
|
||||
yield from ui.animate_pulse(func, ui.WHITE, ui.GREY, speed=400000)
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ from trezor import loop
|
||||
from trezor import ui
|
||||
from trezor import msg
|
||||
from trezor.utils import unimport_gen
|
||||
from trezor.res import loadres
|
||||
from trezor import res
|
||||
|
||||
|
||||
@unimport_gen
|
||||
@ -22,7 +22,7 @@ def layout_tap_to_confirm(address, amount, currency):
|
||||
|
||||
# def func(fg):
|
||||
# ui.display.text(68, 212, 'TAP TO CONFIRM', style, fg, bg)
|
||||
# ui.display.icon(3, 170, loadres('apps/playground/res/tap_64.toig'), bg, fg)
|
||||
# ui.display.icon(3, 170, res.load('apps/playground/res/tap_64.toig'), bg, fg)
|
||||
|
||||
# animation = ui.animate_pulse(func, ui.BLACK, ui.GREY, speed=200000)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from trezor import ui
|
||||
from trezor import loop
|
||||
from trezor.res import loadres
|
||||
from trezor import res
|
||||
|
||||
c = ui.rgbcolor(0x20, 0x98, 0xD1)
|
||||
|
||||
@ -12,7 +12,7 @@ def layout_homescreen():
|
||||
p = 0
|
||||
|
||||
def func(foreground):
|
||||
ui.display.loader(p, c, 0, loadres('apps/playground_stick/res/fingerprint.toig'), foreground)
|
||||
ui.display.loader(p, c, 0, res.load('apps/playground_stick/res/fingerprint.toig'), foreground)
|
||||
p = (p + 10) % 1000
|
||||
|
||||
animation = ui.animate_pulse(func, ui.WHITE, ui.GREY, speed=400000)
|
||||
|
@ -3,7 +3,7 @@ try:
|
||||
except ImportError:
|
||||
resdata = None
|
||||
|
||||
def loadres(name):
|
||||
def load(name):
|
||||
if resdata and name in resdata:
|
||||
return resdata[name]
|
||||
with open(name, 'rb') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user