From 9b7317bfa3a4bc6acf67b4ae23b78dd77356a498 Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sun, 4 Oct 2026 14:24:39 -0700 Subject: [PATCH] fix(boot): use more of the graphical menu for titles --- crates/boot/src/menu/font.rs | 3 --- crates/boot/src/menu/graphical.rs | 20 ++++++-------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/crates/boot/src/menu/font.rs b/crates/boot/src/menu/font.rs index ead5661..906b8f4 100644 --- a/crates/boot/src/menu/font.rs +++ b/crates/boot/src/menu/font.rs @@ -7,9 +7,6 @@ pub type Glyph = [u8; GLYPH_SIZE]; /// Three dots, which are drawn where a title is cut off. pub const ELLIPSIS: Glyph = [0x00, 0x00, 0x00, 0x00, 0x00, 0xDB, 0xDB, 0x00]; -/// A heart, which is drawn next to the selected entry. -pub const HEART: Glyph = [0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, 0x18]; - /// The glyphs for the printable ASCII characters from space to tilde. /// This is the public domain 8x8 font that is commonly used by hobby operating systems. const GLYPHS: [Glyph; 95] = [ diff --git a/crates/boot/src/menu/graphical.rs b/crates/boot/src/menu/graphical.rs index 71a524f..1c050bb 100644 --- a/crates/boot/src/menu/graphical.rs +++ b/crates/boot/src/menu/graphical.rs @@ -1,5 +1,5 @@ use crate::entries::BootableEntry; -use crate::menu::font::{self, ELLIPSIS, GLYPH_SIZE, Glyph, HEART}; +use crate::menu::font::{self, ELLIPSIS, GLYPH_SIZE, Glyph}; use crate::menu::logo::{LOGO, LOGO_HEIGHT, LOGO_WIDTH}; use crate::menu::{BootMenu, wait_for_events}; use alloc::format; @@ -52,7 +52,7 @@ const PANEL_EDGE: BltPixel = BltPixel::new(0x4a, 0x2e, 0x66); /// The color of the pill behind the selected entry, taken from the Sprout logo. const PILL_SELECTED: BltPixel = BltPixel::new(0xff, 0x7a, 0xb8); -/// The color of the title and the heart. +/// The color of the title. const ACCENT: BltPixel = BltPixel::new(0xff, 0xa6, 0xd0); /// The color of entries that aren't selected. @@ -265,10 +265,10 @@ impl Layout { .max() .unwrap_or(0); let status = HINT.len().max(HINT_MOUSE.len()).max(STATUS_WIDEST.len()); - let panel_width = ((longest + 4) * cell + padding * 2) + let panel_width = ((longest + 3) * cell + padding * 2) .max(40 * cell) .max((status + 8) * cell) - .min(width.saturating_sub(margin * 2).min(width * 3 / 5)); + .min(width.saturating_sub(margin * 2).min(width * 4 / 5)); // The header is as tall as the logo, and the logo needs room to bounce. let fit = |logo: usize| { @@ -322,8 +322,8 @@ impl Layout { visible, panel: (panel_x, panel_y, panel_width, panel_height), radius: cell, - text_x: panel_x + padding + cell * 3, - columns: list_width.saturating_sub(cell * 4) / cell, + text_x: panel_x + padding + cell, + columns: list_width.saturating_sub(cell * 2) / cell, footer: list_y + list + cell, logo: (group_x, top + bounce, logo_width, logo_height), bounce, @@ -712,14 +712,6 @@ fn render( layout.height, PILL_SELECTED, ); - draw_glyph( - fb, - layout.x + layout.cell, - text_row, - layout.scale, - &HEART, - TEXT_SELECTED, - ); TEXT_SELECTED } else { TEXT