|
|
|
@ -522,7 +522,8 @@ impl ConfirmBlobParams {
|
|
|
|
|
description_font: &theme::TEXT_NORMAL,
|
|
|
|
|
extra_font: &theme::TEXT_DEMIBOLD,
|
|
|
|
|
data_font: if self.chunkify {
|
|
|
|
|
&theme::TEXT_MONO_ADDRESS_CHUNKS
|
|
|
|
|
let data: StrBuffer = self.data.try_into()?;
|
|
|
|
|
theme::get_chunkified_text_style(data.len())
|
|
|
|
|
} else {
|
|
|
|
|
&theme::TEXT_MONO
|
|
|
|
|
},
|
|
|
|
@ -585,15 +586,8 @@ extern "C" fn new_confirm_address(n_args: usize, args: *const Obj, kwargs: *mut
|
|
|
|
|
let chunkify: bool = kwargs.get_or(Qstr::MP_QSTR_chunkify, false)?;
|
|
|
|
|
|
|
|
|
|
let data_style = if chunkify {
|
|
|
|
|
// Longer addresses have smaller x_offset so they fit even with scrollbar
|
|
|
|
|
// (as they will be shown on more than one page)
|
|
|
|
|
const FITS_ON_ONE_PAGE: usize = 16 * 4;
|
|
|
|
|
let address: StrBuffer = data.try_into()?;
|
|
|
|
|
if address.len() <= FITS_ON_ONE_PAGE {
|
|
|
|
|
&theme::TEXT_MONO_ADDRESS_CHUNKS
|
|
|
|
|
} else {
|
|
|
|
|
&theme::TEXT_MONO_ADDRESS_CHUNKS_SMALLER_X_OFFSET
|
|
|
|
|
}
|
|
|
|
|
theme::get_chunkified_text_style(address.len())
|
|
|
|
|
} else {
|
|
|
|
|
&theme::TEXT_MONO
|
|
|
|
|
};
|
|
|
|
|