1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-30 10:08:18 +00:00

style(core): fix formatting

[no changelog]
This commit is contained in:
Martin Milata 2024-03-30 19:31:47 +01:00
parent 7ce980ca98
commit 8a5afbe585
5 changed files with 7 additions and 10 deletions

View File

@ -75,7 +75,6 @@ where
// let current_account = get_account(scrollbar.active_page); // let current_account = get_account(scrollbar.active_page);
let current_account = "".into(); let current_account = "".into();
Self { Self {
app_name: Label::centered(app_name, theme::TEXT_DEMIBOLD), app_name: Label::centered(app_name, theme::TEXT_DEMIBOLD),
account_name: Label::centered(current_account, theme::TEXT_DEMIBOLD), account_name: Label::centered(current_account, theme::TEXT_DEMIBOLD),
@ -162,7 +161,8 @@ where
// NOTE: This is a hotfix used due to the erroneous behavior of TextLayout. // NOTE: This is a hotfix used due to the erroneous behavior of TextLayout.
// This line should be removed when the problem with TextLayout is fixed. // This line should be removed when the problem with TextLayout is fixed.
// See also the code for FidoConfirm::new(). // See also the code for FidoConfirm::new().
self.account_name.set_text((self.get_account)(self.scrollbar.active_page)); self.account_name
.set_text((self.get_account)(self.scrollbar.active_page));
bounds bounds
} }

View File

@ -1336,10 +1336,7 @@ extern "C" fn new_show_tx_context_menu(n_args: usize, args: *const Obj, kwargs:
let options: [(StrBuffer, Icon); 3] = [ let options: [(StrBuffer, Icon); 3] = [
(StrBuffer::from("Address QR code"), theme::ICON_QR_CODE), (StrBuffer::from("Address QR code"), theme::ICON_QR_CODE),
( (StrBuffer::from("Fee info"), theme::ICON_CHEVRON_RIGHT),
StrBuffer::from("Fee info"),
theme::ICON_CHEVRON_RIGHT,
),
(StrBuffer::from("Cancel transaction"), theme::ICON_CANCEL), (StrBuffer::from("Cancel transaction"), theme::ICON_CANCEL),
]; ];
let content = VerticalMenu::context_menu(options); let content = VerticalMenu::context_menu(options);

View File

@ -6,13 +6,13 @@ mod blur;
mod cache; mod cache;
mod canvas; mod canvas;
mod circle; mod circle;
mod corner_highlight;
mod display; mod display;
#[cfg(feature = "ui_jpeg_decoder")] #[cfg(feature = "ui_jpeg_decoder")]
mod jpeg; mod jpeg;
mod qrcode; mod qrcode;
mod rawimage; mod rawimage;
mod render; mod render;
mod corner_highlight;
mod text; mod text;
mod toif; mod toif;
mod utils; mod utils;
@ -27,13 +27,13 @@ pub use canvas::{
BasicCanvas, Canvas, CanvasBuilder, Mono8Canvas, Rgb565Canvas, Rgba8888Canvas, Viewport, BasicCanvas, Canvas, CanvasBuilder, Mono8Canvas, Rgb565Canvas, Rgba8888Canvas, Viewport,
}; };
pub use circle::Circle; pub use circle::Circle;
pub use corner_highlight::CornerHighlight;
pub use display::{render_on_canvas, render_on_display}; pub use display::{render_on_canvas, render_on_display};
#[cfg(feature = "ui_jpeg_decoder")] #[cfg(feature = "ui_jpeg_decoder")]
pub use jpeg::JpegImage; pub use jpeg::JpegImage;
pub use qrcode::QrImage; pub use qrcode::QrImage;
pub use rawimage::RawImage; pub use rawimage::RawImage;
pub use render::{DirectRenderer, ProgressiveRenderer, Renderer}; pub use render::{DirectRenderer, ProgressiveRenderer, Renderer};
pub use corner_highlight::CornerHighlight;
pub use text::Text; pub use text::Text;
pub use toif::ToifImage; pub use toif::ToifImage;
#[cfg(feature = "model_mercury")] #[cfg(feature = "model_mercury")]

View File

@ -950,7 +950,7 @@ class InputFlowLockTimeDatetime(InputFlowBase):
def assert_func(self, debug: DebugLink, br: messages.ButtonRequest) -> None: def assert_func(self, debug: DebugLink, br: messages.ButtonRequest) -> None:
layout_text = get_text_possible_pagination(debug, br) layout_text = get_text_possible_pagination(debug, br)
TR.assert_in(layout_text, "bitcoin__locktime_set_to") TR.assert_in(layout_text, "bitcoin__locktime_set_to")
assert self.lock_time_str.replace(' ', '') in layout_text.replace(' ', '') assert self.lock_time_str.replace(" ", "") in layout_text.replace(" ", "")
def input_flow_tt(self) -> BRGeneratorType: def input_flow_tt(self) -> BRGeneratorType:
yield from lock_time_input_flow_tt(self.debug, self.assert_func) yield from lock_time_input_flow_tt(self.debug, self.assert_func)