From 1dc5c4c03fbe0373feab840a1556a01a758e260e Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Fri, 23 Aug 2024 17:55:52 +0200 Subject: [PATCH] fix(core): fix model_tr icons for new rendering [no changelog] --- .../src/ui/model_tr/component/homescreen.rs | 11 ---------- .../src/ui/model_tr/res/arrow_down_o.toif | Bin 0 -> 26 bytes .../rust/src/ui/model_tr/res/arrow_up_o.toif | Bin 0 -> 27 bytes .../rust/src/ui/model_tr/res/cancel_o.toif | Bin 0 -> 32 bytes .../rust/src/ui/model_tr/res/delete_o.toif | Bin 0 -> 37 bytes .../rust/src/ui/model_tr/res/next_page_o.toif | Bin 0 -> 27 bytes .../rust/src/ui/model_tr/res/warning_o.toif | Bin 0 -> 44 bytes core/embed/rust/src/ui/model_tr/theme/mod.rs | 19 ++++++++++++++++++ 8 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 core/embed/rust/src/ui/model_tr/res/arrow_down_o.toif create mode 100644 core/embed/rust/src/ui/model_tr/res/arrow_up_o.toif create mode 100644 core/embed/rust/src/ui/model_tr/res/cancel_o.toif create mode 100644 core/embed/rust/src/ui/model_tr/res/delete_o.toif create mode 100644 core/embed/rust/src/ui/model_tr/res/next_page_o.toif create mode 100644 core/embed/rust/src/ui/model_tr/res/warning_o.toif diff --git a/core/embed/rust/src/ui/model_tr/component/homescreen.rs b/core/embed/rust/src/ui/model_tr/component/homescreen.rs index 8f6ddb605c..6750ffe6eb 100644 --- a/core/embed/rust/src/ui/model_tr/component/homescreen.rs +++ b/core/embed/rust/src/ui/model_tr/component/homescreen.rs @@ -232,17 +232,6 @@ impl Homescreen { rect_fill(AREA.split_top(NOTIFICATION_HEIGHT).0, theme::BG); } - fn paint_warning_icons_in_top_corners(&self) { - let warning_icon = theme::ICON_WARNING; - warning_icon.draw(AREA.top_left(), Alignment2D::TOP_LEFT, theme::FG, theme::BG); - warning_icon.draw( - AREA.top_right(), - Alignment2D::TOP_RIGHT, - theme::FG, - theme::BG, - ); - } - fn event_usb(&mut self, ctx: &mut EventCtx, event: Event) { if let Event::USB(USBEvent::Connected(_)) = event { ctx.request_paint(); diff --git a/core/embed/rust/src/ui/model_tr/res/arrow_down_o.toif b/core/embed/rust/src/ui/model_tr/res/arrow_down_o.toif new file mode 100644 index 0000000000000000000000000000000000000000..790976e6c485008afd786d50c2c7a4717684bcf7 GIT binary patch literal 26 hcmWIX_jG4xU}4~6U|@Khp77xRfe(xxpNtzc7yw{^2%G=_ literal 0 HcmV?d00001 diff --git a/core/embed/rust/src/ui/model_tr/res/arrow_up_o.toif b/core/embed/rust/src/ui/model_tr/res/arrow_up_o.toif new file mode 100644 index 0000000000000000000000000000000000000000..03930d53c68cf85d0b84065180e9a9b81451052f GIT binary patch literal 27 hcmWIX_jG4xU}4~AU|>l8aR3O;pZ~zf@v~8f0RV9E3FZI* literal 0 HcmV?d00001 diff --git a/core/embed/rust/src/ui/model_tr/res/cancel_o.toif b/core/embed/rust/src/ui/model_tr/res/cancel_o.toif new file mode 100644 index 0000000000000000000000000000000000000000..6b7971a3655ab5b0d3cf480cfb5d19e5f1acd473 GIT binary patch literal 32 ocmWIX_jG4xU}q3vU|@Khp77xRfe(xxpNtzc1b81YSN>rD0G*u+8~^|S literal 0 HcmV?d00001 diff --git a/core/embed/rust/src/ui/model_tr/res/delete_o.toif b/core/embed/rust/src/ui/model_tr/res/delete_o.toif new file mode 100644 index 0000000000000000000000000000000000000000..763945b55f33dee1c887a39483b91e3fac0f467e GIT binary patch literal 37 tcmWIX_jKoEU}unIU|>l8@!`L{J+nPC^M7`>I)#KE45^JrB^)*}006qO3nTyl literal 0 HcmV?d00001 diff --git a/core/embed/rust/src/ui/model_tr/res/next_page_o.toif b/core/embed/rust/src/ui/model_tr/res/next_page_o.toif new file mode 100644 index 0000000000000000000000000000000000000000..2efb606dc00e719c32093ff8905f7a66cab70459 GIT binary patch literal 27 icmWIX_jG4x;9%fqU|@Ls{CRoj2_;G-N>CYdBN6a%0|8H!RKhttS!H#*#v-XvZE7*-00Z`Eq A4gdfE literal 0 HcmV?d00001 diff --git a/core/embed/rust/src/ui/model_tr/theme/mod.rs b/core/embed/rust/src/ui/model_tr/theme/mod.rs index ba3c7b419e..df9be8f458 100644 --- a/core/embed/rust/src/ui/model_tr/theme/mod.rs +++ b/core/embed/rust/src/ui/model_tr/theme/mod.rs @@ -71,49 +71,68 @@ include_icon!(ICON_ARROW_LEFT, "model_tr/res/arrow_left.toif"); // 4*7 include_icon!(ICON_ARROW_LEFT_BIG, "model_tr/res/arrow_left_big.toif"); // 8*7 include_icon!(ICON_ARROW_RIGHT, "model_tr/res/arrow_right.toif"); // 4*7 include_icon!(ICON_ARROW_RIGHT_FAT, "model_tr/res/arrow_right_fat.toif"); // 4*8 +#[cfg(not(feature = "new_rendering"))] include_icon!( ICON_ARROW_UP, "model_tr/res/arrow_up.toif", empty_right_col = true ); // 8*4 +#[cfg(feature = "new_rendering")] +include_icon!(ICON_ARROW_UP, "model_tr/res/arrow_up_o.toif"); // 8*4 +#[cfg(not(feature = "new_rendering"))] include_icon!( ICON_ARROW_DOWN, "model_tr/res/arrow_down.toif", empty_right_col = true ); // 8*4 +#[cfg(feature = "new_rendering")] +include_icon!(ICON_ARROW_DOWN, "model_tr/res/arrow_down_o.toif"); // 7*4 include_icon!(ICON_ARROW_BACK_UP, "model_tr/res/arrow_back_up.toif"); // 8*8 include_icon!(ICON_BIN, "model_tr/res/bin.toif"); // 10*10 +#[cfg(not(feature = "new_rendering"))] include_icon!( ICON_CANCEL, "model_tr/res/cancel.toif", empty_right_col = true ); // 7*7 +#[cfg(feature = "new_rendering")] +include_icon!(ICON_CANCEL, "model_tr/res/cancel_o.toif"); // 7*7 include_icon!(ICON_COINJOIN, "model_tr/res/coinjoin.toif"); // 12*12 +#[cfg(not(feature = "new_rendering"))] include_icon!( ICON_DELETE, "model_tr/res/delete.toif", empty_right_col = true ); // 9*7 +#[cfg(feature = "new_rendering")] +include_icon!(ICON_DELETE, "model_tr/res/delete_o.toif"); // 9*7 include_icon!(ICON_DEVICE_NAME, "model_tr/res/device_name.toif"); // 116*18 include_icon!(ICON_EYE, "model_tr/res/eye_round.toif"); // 12*7 include_icon!(ICON_LOCK, "model_tr/res/lock.toif"); // 10*10 include_icon!(ICON_LOCK_SMALL, "model_tr/res/lock_small.toif"); // 6*7 include_icon!(ICON_LOGO, "model_tr/res/logo_22_33.toif"); // 22*33 include_icon!(ICON_LOGO_EMPTY, "model_tr/res/logo_22_33_empty.toif"); +#[cfg(not(feature = "new_rendering"))] include_icon!( ICON_NEXT_PAGE, "model_tr/res/next_page.toif", empty_right_col = true ); // 10*8 +#[cfg(feature = "new_rendering")] +include_icon!(ICON_NEXT_PAGE, "model_tr/res/next_page_o.toif"); // 9*8 include_icon!(ICON_PREV_PAGE, "model_tr/res/prev_page.toif"); // 8*10 include_icon!(ICON_SPACE, "model_tr/res/space.toif"); // 12*3 include_icon!(ICON_TICK, "model_tr/res/tick.toif"); // 8*6 include_icon!(ICON_TICK_FAT, "model_tr/res/tick_fat.toif"); // 8*6 +#[cfg(not(feature = "new_rendering"))] include_icon!( ICON_WARNING, "model_tr/res/warning.toif", empty_right_col = true ); // 12*12 +#[cfg(feature = "new_rendering")] +include_icon!(ICON_WARNING, "model_tr/res/warning_o.toif"); // 11*12 + include_icon!(ICON_WARN_TITLE, "model_tr/res/bld_header_warn.toif"); // checklist settings