From ae7a1c7d527c2fd5989e31498691df8ed4f4c1e7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Fri, 18 Aug 2023 12:53:08 +0200 Subject: [PATCH] refactor(core): render full/empty logo same way as in TR --- .../ui/model_tt/component/welcome_screen.rs | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/core/embed/rust/src/ui/model_tt/component/welcome_screen.rs b/core/embed/rust/src/ui/model_tt/component/welcome_screen.rs index ac45d6d630..bc167a95b7 100644 --- a/core/embed/rust/src/ui/model_tt/component/welcome_screen.rs +++ b/core/embed/rust/src/ui/model_tt/component/welcome_screen.rs @@ -40,21 +40,17 @@ impl Component for WelcomeScreen { } fn paint(&mut self) { - if self.empty_lock { - theme::ICON_LOGO_EMPTY.draw( - self.area.top_center() + Offset::y(ICON_TOP_MARGIN), - Alignment2D::TOP_CENTER, - theme::FG, - theme::BG, - ); + let logo = if self.empty_lock { + theme::ICON_LOGO_EMPTY } else { - theme::ICON_LOGO.draw( - self.area.top_center() + Offset::y(ICON_TOP_MARGIN), - Alignment2D::TOP_CENTER, - theme::FG, - theme::BG, - ); - } + theme::ICON_LOGO + }; + logo.draw( + self.area.top_center() + Offset::y(ICON_TOP_MARGIN), + Alignment2D::TOP_CENTER, + theme::FG, + theme::BG, + ); #[cfg(not(feature = "bootloader"))] display::text_center( self.area.bottom_center() - Offset::y(TEXT_BOTTOM_MARGIN),