mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-06 23:02:33 +00:00
feat(core/rust): change design of TT's success screen
[no changelog]
This commit is contained in:
parent
7d453bd100
commit
87c7d7f028
@ -129,7 +129,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn with_description(self, description: T) -> Self {
|
pub fn with_description(self, description: T) -> Self {
|
||||||
self.with_text(&theme::TEXT_NORMAL_OFF_WHITE, description)
|
self.with_text(&theme::TEXT_NORMAL, description)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_shares(lines: [T; 4], controls: U) -> Self {
|
pub fn new_shares(lines: [T; 4], controls: U) -> Self {
|
||||||
|
@ -1037,14 +1037,9 @@ extern "C" fn new_show_warning(n_args: usize, args: *const Obj, kwargs: *mut Map
|
|||||||
|
|
||||||
extern "C" fn new_show_success(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj {
|
extern "C" fn new_show_success(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj {
|
||||||
let block = move |_args: &[Obj], kwargs: &Map| {
|
let block = move |_args: &[Obj], kwargs: &Map| {
|
||||||
let icon = BlendedImage::new(
|
// Not showing the rounded background, just the check icon
|
||||||
theme::IMAGE_BG_CIRCLE,
|
let icon = BlendedImage::single(theme::IMAGE_FG_SUCCESS, theme::FG, theme::BG);
|
||||||
theme::IMAGE_FG_SUCCESS,
|
new_show_modal(kwargs, icon, theme::button_success())
|
||||||
theme::SUCCESS_COLOR,
|
|
||||||
theme::FG,
|
|
||||||
theme::BG,
|
|
||||||
);
|
|
||||||
new_show_modal(kwargs, icon, theme::button_confirm())
|
|
||||||
};
|
};
|
||||||
unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) }
|
unsafe { util::try_with_args_and_kwargs(n_args, args, kwargs, block) }
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,38 @@ pub const fn button_confirm() -> ButtonStyleSheet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub const fn button_success() -> ButtonStyleSheet {
|
||||||
|
ButtonStyleSheet {
|
||||||
|
normal: &ButtonStyle {
|
||||||
|
font: Font::BOLD,
|
||||||
|
text_color: FG,
|
||||||
|
button_color: GREY_MEDIUM,
|
||||||
|
background_color: BG,
|
||||||
|
border_color: BG,
|
||||||
|
border_radius: RADIUS,
|
||||||
|
border_width: 0,
|
||||||
|
},
|
||||||
|
active: &ButtonStyle {
|
||||||
|
font: Font::BOLD,
|
||||||
|
text_color: FG,
|
||||||
|
button_color: GREY_DARK,
|
||||||
|
background_color: BG,
|
||||||
|
border_color: FG,
|
||||||
|
border_radius: RADIUS,
|
||||||
|
border_width: 0,
|
||||||
|
},
|
||||||
|
disabled: &ButtonStyle {
|
||||||
|
font: Font::BOLD,
|
||||||
|
text_color: FG,
|
||||||
|
button_color: GREY_LIGHT,
|
||||||
|
background_color: BG,
|
||||||
|
border_color: BG,
|
||||||
|
border_radius: RADIUS,
|
||||||
|
border_width: 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub const fn button_cancel() -> ButtonStyleSheet {
|
pub const fn button_cancel() -> ButtonStyleSheet {
|
||||||
ButtonStyleSheet {
|
ButtonStyleSheet {
|
||||||
normal: &ButtonStyle {
|
normal: &ButtonStyle {
|
||||||
|
Loading…
Reference in New Issue
Block a user