From 3d36885e118f9cb1cce7af34646a67378d2a2039 Mon Sep 17 00:00:00 2001 From: rhetenor Date: Sun, 30 Aug 2026 08:14:54 +0000 Subject: [PATCH] flash_info_view: align content justified --- src/views/flash_info_view.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/flash_info_view.rs b/src/views/flash_info_view.rs index 54a0bc6..cb407b0 100644 --- a/src/views/flash_info_view.rs +++ b/src/views/flash_info_view.rs @@ -16,6 +16,7 @@ use embedded_graphics::{ pixelcolor::Rgb565, prelude::*, primitives::Rectangle, + text::Text, }; use alloc::format; @@ -34,7 +35,11 @@ impl Navigable for FlashInfoView { peripherals: &Peripherals, ) -> impl core::future::Future>> + Send { async move { - let _style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE); + outputs + .primary_display + .clear(Rgb565::BLACK) + .map_err(PrimaryDisplayError::from)?; + let style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE); let mut magic_bytes: [u8; MAGIC_REGION.size] = [0; MAGIC_REGION.size]; peripherals .store @@ -55,7 +60,7 @@ impl Navigable for FlashInfoView { let style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE); let textbox_style = TextBoxStyleBuilder::new() .height_mode(HeightMode::FitToText) - .alignment(HorizontalAlignment::Center) + .alignment(HorizontalAlignment::Justified) .build(); let display_area = outputs.primary_display.bounding_box();