1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

feat(core): add icons for T3T1

This commit is contained in:
Martin Milata 2024-03-07 00:40:58 +01:00 committed by obrusvit
parent ec0dfd420e
commit 5ed1516cc4
36 changed files with 39 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

View File

@ -63,8 +63,44 @@ pub const RADIUS: u8 = 2;
pub const QR_SIDE_MAX: u32 = 140;
// UI icons (greyscale).
// 20x20
include_icon!(
ICON_BULLET_CHECKMARK,
"model_mercury/res/bullet_checkmark20.toif"
);
include_icon!(ICON_PAGE_DOWN, "model_mercury/res/page_down20.toif");
include_icon!(ICON_PAGE_UP, "model_mercury/res/page_up20.toif");
// 24x24
include_icon!(ICON_CANCEL, "model_mercury/res/cancel24.toif");
include_icon!(ICON_CHEVRON_RIGHT, "model_mercury/res/chevron_right24.toif");
include_icon!(ICON_DOWNLOAD, "model_mercury/res/download24.toif");
include_icon!(
ICON_EXCLAMATION_MARK,
"model_mercury/res/exclamation_mark24.toif"
);
include_icon!(ICON_FIRE, "model_mercury/res/fire24.toif");
include_icon!(ICON_QR_CODE, "model_mercury/res/qr_code24.toif");
include_icon!(ICON_REBOOT, "model_mercury/res/reboot24.toif");
// 30x30
include_icon!(ICON_AUTOFILL, "model_mercury/res/autofill30.toif");
include_icon!(ICON_CLOSE, "model_mercury/res/close30.toif");
include_icon!(ICON_DELETE, "model_mercury/res/delete30.toif");
include_icon!(ICON_MENU, "model_mercury/res/menu30.toif");
include_icon!(
ICON_SIMPLE_CHECKMARK,
"model_mercury/res/simple_checkmark30.toif"
);
// 40x40
include_icon!(ICON_MINUS, "model_mercury/res/minus40.toif");
include_icon!(ICON_PLUS, "model_mercury/res/plus40.toif");
// TODO remove TT icons:
// Button icons.
include_icon!(ICON_CANCEL, "model_tt/res/x24.toif");
include_icon!(ICON_CONFIRM, "model_tt/res/check24.toif");
include_icon!(ICON_SPACE, "model_tt/res/space.toif");
include_icon!(ICON_BACK, "model_tt/res/caret-left24.toif");

View File

@ -215,8 +215,8 @@ def from_image(
image = image.convert("L")
if image.mode == "L":
if image.size[0] % 2 != 0:
raise ValueError("Only even-width grayscale images are supported")
# if image.size[0] % 2 != 0:
# raise ValueError("Only even-width grayscale images are supported")
if not legacy_format:
toif_mode = ToifMode.grayscale_eh
toif_data = _from_pil_grayscale(image.getdata(), right_hi=True)