diff --git a/core/embed/rust/src/ui/model_mercury/res/autofill30.png b/core/embed/rust/src/ui/model_mercury/res/autofill30.png new file mode 100644 index 000000000..16cd93f3a Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/autofill30.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/autofill30.toif b/core/embed/rust/src/ui/model_mercury/res/autofill30.toif new file mode 100644 index 000000000..5551d07fe Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/autofill30.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/bullet_checkmark20.png b/core/embed/rust/src/ui/model_mercury/res/bullet_checkmark20.png new file mode 100644 index 000000000..0681bec6f Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/bullet_checkmark20.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/bullet_checkmark20.toif b/core/embed/rust/src/ui/model_mercury/res/bullet_checkmark20.toif new file mode 100644 index 000000000..3544814d6 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/bullet_checkmark20.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/cancel24.png b/core/embed/rust/src/ui/model_mercury/res/cancel24.png new file mode 100644 index 000000000..0ab5220ca Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/cancel24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/cancel24.toif b/core/embed/rust/src/ui/model_mercury/res/cancel24.toif new file mode 100644 index 000000000..5344dea59 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/cancel24.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/chevron_right24.png b/core/embed/rust/src/ui/model_mercury/res/chevron_right24.png new file mode 100644 index 000000000..5dea415ff Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/chevron_right24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/chevron_right24.toif b/core/embed/rust/src/ui/model_mercury/res/chevron_right24.toif new file mode 100644 index 000000000..32666c3ec Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/chevron_right24.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/close30.png b/core/embed/rust/src/ui/model_mercury/res/close30.png new file mode 100644 index 000000000..0e5b188bf Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/close30.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/close30.toif b/core/embed/rust/src/ui/model_mercury/res/close30.toif new file mode 100644 index 000000000..b9e2f3c4f Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/close30.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/delete30.png b/core/embed/rust/src/ui/model_mercury/res/delete30.png new file mode 100644 index 000000000..3366c0704 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/delete30.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/delete30.toif b/core/embed/rust/src/ui/model_mercury/res/delete30.toif new file mode 100644 index 000000000..925396407 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/delete30.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/download24.png b/core/embed/rust/src/ui/model_mercury/res/download24.png new file mode 100644 index 000000000..9a9233e4d Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/download24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/exclamation_mark24.png b/core/embed/rust/src/ui/model_mercury/res/exclamation_mark24.png new file mode 100644 index 000000000..5627767ba Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/exclamation_mark24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/exclamation_mark24.toif b/core/embed/rust/src/ui/model_mercury/res/exclamation_mark24.toif new file mode 100644 index 000000000..8e9f46036 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/exclamation_mark24.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/fire24.png b/core/embed/rust/src/ui/model_mercury/res/fire24.png new file mode 100644 index 000000000..c075d37fb Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/fire24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/menu30.png b/core/embed/rust/src/ui/model_mercury/res/menu30.png new file mode 100644 index 000000000..8c48673a9 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/menu30.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/menu30.toif b/core/embed/rust/src/ui/model_mercury/res/menu30.toif new file mode 100644 index 000000000..48c9706ec Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/menu30.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/minus40.png b/core/embed/rust/src/ui/model_mercury/res/minus40.png new file mode 100644 index 000000000..d17c01f1e Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/minus40.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/minus40.toif b/core/embed/rust/src/ui/model_mercury/res/minus40.toif new file mode 100644 index 000000000..b284565c8 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/minus40.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/page_down20.png b/core/embed/rust/src/ui/model_mercury/res/page_down20.png new file mode 100644 index 000000000..740ce632c Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/page_down20.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/page_down20.toif b/core/embed/rust/src/ui/model_mercury/res/page_down20.toif new file mode 100644 index 000000000..4beae7db0 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/page_down20.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/page_up20.png b/core/embed/rust/src/ui/model_mercury/res/page_up20.png new file mode 100644 index 000000000..d8b1695bf Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/page_up20.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/page_up20.toif b/core/embed/rust/src/ui/model_mercury/res/page_up20.toif new file mode 100644 index 000000000..8b48f18f1 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/page_up20.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/plus40.png b/core/embed/rust/src/ui/model_mercury/res/plus40.png new file mode 100644 index 000000000..78d98a494 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/plus40.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/plus40.toif b/core/embed/rust/src/ui/model_mercury/res/plus40.toif new file mode 100644 index 000000000..098b5a73d Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/plus40.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/qr_code24.png b/core/embed/rust/src/ui/model_mercury/res/qr_code24.png new file mode 100644 index 000000000..44e5c765c Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/qr_code24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/qr_code24.toif b/core/embed/rust/src/ui/model_mercury/res/qr_code24.toif new file mode 100644 index 000000000..bbb31eedb Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/qr_code24.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/reboot24.png b/core/embed/rust/src/ui/model_mercury/res/reboot24.png new file mode 100644 index 000000000..0532dcc52 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/reboot24.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/reboot24.toif b/core/embed/rust/src/ui/model_mercury/res/reboot24.toif new file mode 100644 index 000000000..feeb9c49c Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/reboot24.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/res/simple_checkmark30.png b/core/embed/rust/src/ui/model_mercury/res/simple_checkmark30.png new file mode 100644 index 000000000..50ff2f99d Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/simple_checkmark30.png differ diff --git a/core/embed/rust/src/ui/model_mercury/res/simple_checkmark30.toif b/core/embed/rust/src/ui/model_mercury/res/simple_checkmark30.toif new file mode 100644 index 000000000..1e4001c28 Binary files /dev/null and b/core/embed/rust/src/ui/model_mercury/res/simple_checkmark30.toif differ diff --git a/core/embed/rust/src/ui/model_mercury/theme/mod.rs b/core/embed/rust/src/ui/model_mercury/theme/mod.rs index a1116acca..56fd5f560 100644 --- a/core/embed/rust/src/ui/model_mercury/theme/mod.rs +++ b/core/embed/rust/src/ui/model_mercury/theme/mod.rs @@ -47,6 +47,43 @@ pub const FATAL_ERROR_HIGHLIGHT_COLOR: Color = Color::rgb(0xFF, 0x41, 0x41); pub const RADIUS: u8 = 2; // 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_mercury/res/x24.toif"); include_icon!(ICON_CONFIRM, "model_mercury/res/check24.toif"); diff --git a/python/src/trezorlib/toif.py b/python/src/trezorlib/toif.py index 9382c5d3a..138a9bdba 100644 --- a/python/src/trezorlib/toif.py +++ b/python/src/trezorlib/toif.py @@ -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)