mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-03 12:28:13 +00:00
chore(core/eckhart): Update ConfirmAction button styling logic
This commit is contained in:
parent
1f69975ba9
commit
41a852c675
@ -76,11 +76,16 @@ impl FirmwareUI for UIEckhart {
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
let verb = verb.unwrap_or(TR::buttons__confirm.into());
|
let right_button = if hold {
|
||||||
let mut right_button = Button::with_text(verb).styled(theme::firmware::button_confirm());
|
let verb = verb.unwrap_or(TR::buttons__hold_to_confirm.into());
|
||||||
if hold {
|
Button::with_text(verb)
|
||||||
right_button = right_button.with_long_press(theme::CONFIRM_HOLD_DURATION);
|
.with_long_press(theme::CONFIRM_HOLD_DURATION)
|
||||||
}
|
.styled(theme::firmware::button_confirm())
|
||||||
|
} else if let Some(verb) = verb {
|
||||||
|
Button::with_text(verb)
|
||||||
|
} else {
|
||||||
|
Button::with_text(TR::buttons__confirm.into()).styled(theme::firmware::button_confirm())
|
||||||
|
};
|
||||||
|
|
||||||
let mut screen = TextScreen::new(paragraphs)
|
let mut screen = TextScreen::new(paragraphs)
|
||||||
.with_header(Header::new(title))
|
.with_header(Header::new(title))
|
||||||
|
@ -633,6 +633,7 @@ def confirm_value(
|
|||||||
info_title: str | None = None,
|
info_title: str | None = None,
|
||||||
chunkify_info: bool = False,
|
chunkify_info: bool = False,
|
||||||
warning_footer: str | None = None,
|
warning_footer: str | None = None,
|
||||||
|
cancel: bool = False,
|
||||||
) -> Awaitable[None]:
|
) -> Awaitable[None]:
|
||||||
"""General confirmation dialog, used by many other confirm_* functions."""
|
"""General confirmation dialog, used by many other confirm_* functions."""
|
||||||
|
|
||||||
@ -655,7 +656,7 @@ def confirm_value(
|
|||||||
hold=hold,
|
hold=hold,
|
||||||
chunkify=chunkify,
|
chunkify=chunkify,
|
||||||
warning_footer=warning_footer,
|
warning_footer=warning_footer,
|
||||||
cancel=False,
|
cancel=cancel,
|
||||||
),
|
),
|
||||||
info_layout,
|
info_layout,
|
||||||
br_name,
|
br_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user