diff --git a/crates/ui-gallery/src/chrome/card.rs b/crates/ui-gallery/src/chrome/card.rs index 2a57dd776..acca6c060 100644 --- a/crates/ui-gallery/src/chrome/card.rs +++ b/crates/ui-gallery/src/chrome/card.rs @@ -149,7 +149,7 @@ impl Card<'_> { .strength(HeaderStrength::Heading) .pad(pad); if let Some(note) = self.note { - panel = panel.subtitle(format!("· {note}")); + panel = panel.note(note.to_owned()); } let mut commands = Vec::new(); if self.open { diff --git a/crates/ui-panels/src/sections/panel.rs b/crates/ui-panels/src/sections/panel.rs index 1ceeb2c50..4d4786d73 100644 --- a/crates/ui-panels/src/sections/panel.rs +++ b/crates/ui-panels/src/sections/panel.rs @@ -60,8 +60,8 @@ type FooterFn<'a> = Box) + 'a>; /// A panel of a workspace: scrolling body, optional footer, optional title row. /// /// - Title: names the panel for assistive technology. A docked panel shows no header, since its dock tab names it. -/// - Header: [`titled`](Panel::titled) or [`band`](Panel::band) shows the title in a header, with the optional icon and -/// subtitle, the commands in `commands` and the actions in `actions`; without a header these show nowhere. The Menu +/// - Header: [`titled`](Panel::titled) or [`band`](Panel::band) shows the title in a header, with the optional icon, +/// note and subtitle, the commands in `commands` and the actions in `actions`; without a header these show nowhere. The Menu /// action opens the rows given to `menu` under the title row; Close asks the panel to close, which hides its body /// until the host stops showing it (bind the state with `opened` to keep it); Float is reported in /// `PanelOutput::action` for the host. @@ -79,7 +79,10 @@ pub struct Panel<'a> { /// Binds the open state to `open`. #[prop(name = "opened")] open: Option>, - /// Text after the title in the header. + /// A note run on after the title in the header ("· note"). + #[prop(into)] + note: Option