mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
tests/ui: omit the red square from screenshots
except the first one on homescreen because it gets rendered only once
This commit is contained in:
parent
23b3a59a5d
commit
30858c4969
@ -37,9 +37,11 @@ if __debug__:
|
|||||||
layout_change_chan = loop.chan()
|
layout_change_chan = loop.chan()
|
||||||
current_content = None # type: Optional[List[str]]
|
current_content = None # type: Optional[List[str]]
|
||||||
|
|
||||||
def screenshot() -> None:
|
def screenshot() -> bool:
|
||||||
if utils.SAVE_SCREEN or save_screen:
|
if utils.SAVE_SCREEN or save_screen:
|
||||||
ui.display.save(save_screen_directory + "/refresh-")
|
ui.display.save(save_screen_directory + "/refresh-")
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def notify_layout_change(layout: ui.Layout) -> None:
|
def notify_layout_change(layout: ui.Layout) -> None:
|
||||||
global current_content
|
global current_content
|
||||||
|
@ -42,9 +42,9 @@ if __debug__:
|
|||||||
from apps.debug import screenshot
|
from apps.debug import screenshot
|
||||||
|
|
||||||
def refresh() -> None:
|
def refresh() -> None:
|
||||||
|
if not screenshot():
|
||||||
display.bar(Display.WIDTH - 8, 0, 8, 8, 0xF800)
|
display.bar(Display.WIDTH - 8, 0, 8, 8, 0xF800)
|
||||||
display.refresh()
|
display.refresh()
|
||||||
screenshot()
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user