WIP - not having 2px header bottom margin

grdddj/tr_content_centering
grdddj 11 months ago
parent 4223957756
commit 66d0f8024a

@ -24,7 +24,9 @@ use crate::ui::component::image::Image;
use crate::ui::geometry::Alignment2D;
#[cfg(feature = "backlight")]
use crate::{time::Duration, trezorhal::time};
use crate::time::Duration;
#[cfg(feature = "backlight")]
use crate::trezorhal::time;
use crate::{
trezorhal::{buffers, display, uzlib::UzlibContext},

@ -161,11 +161,8 @@ where
(content_area, scrollbar_area, Rect::zero())
}
} else {
const TITLE_SPACE: i16 = 2;
let (title_and_scrollbar_area, content_area) =
bounds.split_top(theme::FONT_HEADER.line_height());
let content_area = content_area.inset(Insets::top(TITLE_SPACE));
// When there is only one page, do not allocate anything for scrollbar,
// which would reduce the space for title

@ -399,9 +399,8 @@ extern "C" fn new_confirm_reset_device(n_args: usize, args: *const Obj, kwargs:
let ops = OpTextLayout::<StrBuffer>::new(theme::TEXT_NORMAL)
.text_normal("By continuing you agree to Trezor Company's terms and conditions.".into())
.newline()
.newline()
.text_normal("More info at".into())
.next_page()
.text_normal("More info at ".into())
.newline()
.text_bold("trezor.io/tos".into());
let formatted = FormattedText::new(ops).vertically_centered();

@ -16,7 +16,7 @@ async def wipe_device(msg: WipeDevice) -> Success:
"confirm_wipe",
"Wipe device",
"All data will be erased.",
"Do you really want to wipe the device?\n",
"Do you really want to wipe the device?",
reverse=True,
verb="Hold to confirm",
hold=True,

Loading…
Cancel
Save