mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
WIP - decrease the font size in Flow pages
This commit is contained in:
parent
3401aa0a59
commit
f209698877
@ -143,7 +143,9 @@ where
|
||||
let (title_content_area, button_area) = bounds.split_bottom(theme::BUTTON_HEIGHT);
|
||||
// Accounting for possible title
|
||||
let content_area = if self.common_title.is_some() {
|
||||
title_content_area.split_top(10).1
|
||||
title_content_area
|
||||
.split_top(theme::FONT_HEADER.line_height())
|
||||
.1
|
||||
} else {
|
||||
title_content_area
|
||||
};
|
||||
|
@ -191,7 +191,7 @@ impl<const M: usize> Page<M> {
|
||||
impl<const M: usize> Page<M> {
|
||||
pub fn icon_label_text(self, icon: IconAndName, label: StrBuffer, text: StrBuffer) -> Self {
|
||||
self.icon_with_offset(icon, 3)
|
||||
.text_normal(label)
|
||||
.text_mono(label)
|
||||
.newline()
|
||||
.text_bold(text)
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ extern "C" fn confirm_output(n_args: usize, args: *const Obj, kwargs: *mut Map)
|
||||
let truncated_address: StrBuffer =
|
||||
kwargs.get(Qstr::MP_QSTR_truncated_address)?.try_into()?;
|
||||
let amount: StrBuffer = kwargs.get(Qstr::MP_QSTR_amount)?.try_into()?;
|
||||
let title: StrBuffer = "Send".into();
|
||||
let title: StrBuffer = "SEND".into();
|
||||
|
||||
let get_page = move |page_index| {
|
||||
// Showing two screens - the recipient address and summary confirmation
|
||||
@ -212,7 +212,7 @@ extern "C" fn confirm_output(n_args: usize, args: *const Obj, kwargs: *mut Map)
|
||||
Some(ButtonDetails::text("CONTINUE")),
|
||||
);
|
||||
let btn_actions = ButtonActions::cancel_next();
|
||||
Page::<20>::new(btn_layout, btn_actions, Font::NORMAL).icon_label_text(
|
||||
Page::<20>::new(btn_layout, btn_actions, Font::MONO).icon_label_text(
|
||||
theme::ICON_USER,
|
||||
"Recipient".into(),
|
||||
address.clone(),
|
||||
@ -229,7 +229,7 @@ extern "C" fn confirm_output(n_args: usize, args: *const Obj, kwargs: *mut Map)
|
||||
),
|
||||
);
|
||||
let btn_actions = ButtonActions::cancel_confirm();
|
||||
Page::<20>::new(btn_layout, btn_actions, Font::NORMAL)
|
||||
Page::<20>::new(btn_layout, btn_actions, Font::MONO)
|
||||
.icon_label_text(
|
||||
theme::ICON_USER,
|
||||
"Recipient".into(),
|
||||
@ -271,7 +271,7 @@ extern "C" fn confirm_total(n_args: usize, args: *const Obj, kwargs: *mut Map) -
|
||||
);
|
||||
let btn_actions = ButtonActions::cancel_confirm();
|
||||
|
||||
let mut flow_page = Page::<25>::new(btn_layout, btn_actions, Font::NORMAL)
|
||||
let mut flow_page = Page::<25>::new(btn_layout, btn_actions, Font::MONO)
|
||||
.icon_label_text(theme::ICON_PARAM, total_label.clone(), total_amount.clone())
|
||||
.newline()
|
||||
.icon_label_text(theme::ICON_PARAM, fee_label.clone(), fee_amount.clone());
|
||||
|
Loading…
Reference in New Issue
Block a user