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 0000000000..16cd93f3aa 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 0000000000..5551d07fe6 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 0000000000..0681bec6f3 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 0000000000..3544814d68 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 0000000000..0ab5220ca0 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 0000000000..5344dea592 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 0000000000..5dea415fff 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 0000000000..32666c3ecd 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 0000000000..0e5b188bf9 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 0000000000..b9e2f3c4fb 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 0000000000..3366c07048 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 0000000000..925396407b 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 0000000000..9a9233e4d6 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 0000000000..5627767ba8 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 0000000000..8e9f460369 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 0000000000..c075d37fba 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 0000000000..8c48673a9c 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 0000000000..48c9706ec7 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 0000000000..d17c01f1e2 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 0000000000..b284565c85 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 0000000000..740ce632c5 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 0000000000..4beae7db0b 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 0000000000..d8b1695bf8 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 0000000000..8b48f18f1e 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 0000000000..78d98a4946 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 0000000000..098b5a73d5 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 0000000000..44e5c765c1 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 0000000000..bbb31eedbb 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 0000000000..0532dcc52f 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 0000000000..feeb9c49c1 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 0000000000..50ff2f99dc 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 0000000000..1e4001c284 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 a1116acca6..56fd5f5607 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 9382c5d3ab..138a9bdbad 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)