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