From d49f955171da1c21c59a2a63c613f722e3eca9cc Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Fri, 7 Aug 2026 13:29:59 +0200 Subject: [PATCH] fix(console/host menu): the actions get their explainer line and room to breathe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rows sat hard against the pinned title — the menu is the one form screen with no subtitle, so the list started at the very top of the content band. It now wears Add Host's explainer, which both says what the menu is for and is the air that keeps the first row off the title. A pinned card explains what unpinning does and does not touch, the same wording the Android dialog uses. Caught by the screenshot pass, not by a test. --- .../pf-console-ui/src/screens/host_options.rs | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/crates/pf-console-ui/src/screens/host_options.rs b/crates/pf-console-ui/src/screens/host_options.rs index 424c22d0..f8c5d30d 100644 --- a/crates/pf-console-ui/src/screens/host_options.rs +++ b/crates/pf-console-ui/src/screens/host_options.rs @@ -17,7 +17,7 @@ use crate::glyphs::{Hint, HintKey}; use crate::model::{ConsoleCmd, HostRow}; use crate::pointer::Pointer; use crate::screens::{Ctx, Outbox, Screen}; -use crate::theme::Fonts; +use crate::theme::{fg, Fonts, W}; use crate::widgets::{ListMsg, MenuList, RowSpec}; use pf_client_core::gamepad::{MenuEvent, MenuPulse}; use skia_safe::{Canvas, Rect}; @@ -219,12 +219,38 @@ impl HostOptionsScreen { fonts: &Fonts, _ctx: &mut Ctx, ) { + // The explainer line, as on Add Host — it says what this menu is FOR, and the air it + // takes is what keeps the first row off the pinned title. + let blurb = if self.host.pin.is_some() { + "This card is a shortcut to one profile on this host. Unpinning it changes \ + nothing about the host or the profile." + } else { + "Manage this saved host." + }; + let cx = f64::from(rect.left) + f64::from(rect.width()) / 2.0; + fonts.centered( + canvas, + blurb, + W::Regular, + 13.0 * k, + fg(0.55), + cx, + f64::from(rect.top) + 2.0 * k, + f64::from(rect.width()) * 0.72, + ); + let list_rect = Rect::from_ltrb( + rect.left, + rect.top + (34.0 * k) as f32, + rect.right, + rect.bottom, + ); let rows: Vec = self .actions() .into_iter() .map(|a| RowSpec::action(self.label(a), true)) .collect(); - self.list.render(canvas, rect, &rows, fonts, k, dt, true); + self.list + .render(canvas, list_rect, &rows, fonts, k, dt, true); } }