1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-08 09:58:46 +00:00

core/boot: modify initial lockscreen label

This commit is contained in:
matejcik 2020-04-24 12:02:01 +02:00 committed by matejcik
parent 09af8aed4e
commit a9ddc2a8e2
2 changed files with 6 additions and 3 deletions

View File

@ -14,8 +14,11 @@ async def lockscreen() -> None:
class Lockscreen(HomescreenBase): class Lockscreen(HomescreenBase):
def __init__(self, lock_label: str = "Locked") -> None: def __init__(
self, lock_label: str = "Locked", tap_label: str = "Tap to unlock"
) -> None:
self.lock_label = lock_label self.lock_label = lock_label
self.tap_label = tap_label
super().__init__() super().__init__()
def render_lock(self) -> None: def render_lock(self) -> None:
@ -26,7 +29,7 @@ class Lockscreen(HomescreenBase):
) )
ui.display.text_center( ui.display.text_center(
ui.WIDTH // 2 + 10, 220, "Tap to unlock", ui.BOLD, ui.TITLE_GREY, ui.BG ui.WIDTH // 2 + 10, 220, self.tap_label, ui.BOLD, ui.TITLE_GREY, ui.BG
) )
ui.display.icon(45, 202, res.load(ui.ICON_CLICK), ui.TITLE_GREY, ui.BG) ui.display.icon(45, 202, res.load(ui.ICON_CLICK), ui.TITLE_GREY, ui.BG)

View File

@ -9,7 +9,7 @@ from apps.homescreen.lockscreen import Lockscreen
async def bootscreen() -> None: async def bootscreen() -> None:
lockscreen = Lockscreen(lock_label="Disconnected") lockscreen = Lockscreen(lock_label="Not connected", tap_label="Tap to connect")
ui.display.orientation(storage.device.get_rotation()) ui.display.orientation(storage.device.get_rotation())
while True: while True:
try: try: