diff --git a/crates/ui-panels/src/dialog/frame.rs b/crates/ui-panels/src/dialog/frame.rs index 5491eed6e..c0d9d29cd 100644 --- a/crates/ui-panels/src/dialog/frame.rs +++ b/crates/ui-panels/src/dialog/frame.rs @@ -138,7 +138,8 @@ pub struct FooterHost<'s, 'a> { /// Fills the header region: the title and, for a closable shell, the close action. #[doc(hidden)] -pub fn header(ui: &mut Ui, cx: &mut BodyCx<'_>, actions: &[HeaderAction]) { +pub fn header(ui: &mut Ui, cx: &mut BodyCx<'_>, actions: &[HeaderAction], note: Option<&Label>) { + let _ = note; let shown = TitleRow::new(cx.label()).strength(HeaderStrength::Heading).level(TITLE_LEVEL).actions(actions.iter().copied()).show(ui); if shown.action == Some(HeaderAction::Close) { cx.request_close(); @@ -318,7 +319,7 @@ impl Component for DialogFrame<'_> { impl Container for DialogFrame<'_> { fn header(&mut self, ui: &mut Ui, cx: &mut BodyCx<'_>) { - header(ui, cx, close_action(self.closable)); + header(ui, cx, close_action(self.closable), None); // P3(pdf-comments-w6): CM-C27 } fn footer(&mut self, ui: &mut Ui, cx: &mut BodyCx<'_>) { diff --git a/crates/ui-panels/src/dialog/mod.rs b/crates/ui-panels/src/dialog/mod.rs index d67772d4d..5e7cbde5a 100644 --- a/crates/ui-panels/src/dialog/mod.rs +++ b/crates/ui-panels/src/dialog/mod.rs @@ -32,7 +32,7 @@ pub use host::{DialogHost, DialogResult, FieldRefusal, OpenDialog, StackDialog, pub use modal::{Dialog, DialogStyle}; pub use prompt::{Prompt, PromptOutput}; pub use prompts::{PromptAnswer, PromptChoice, PromptKind, StandardPrompt, StandardPromptOutput}; -pub use recovery::{RecoveredDocument, RecoveryAnswer, RecoveryDialog, RecoveryOutput}; +pub use recovery::{RecoveredDocument, RecoveryAnswer, RecoveryChoice, RecoveryDialog, RecoveryOutput}; pub use serde_fields::{serde_fields, set_serde_field}; pub use stack::{DialogId, DialogStack, dialog_id}; pub use unsaved::{UnsavedAnswer, UnsavedChangesDialog, UnsavedChangesOutput}; diff --git a/crates/ui-panels/src/dialog/modal.rs b/crates/ui-panels/src/dialog/modal.rs index c68a5e987..4f004a0f1 100644 --- a/crates/ui-panels/src/dialog/modal.rs +++ b/crates/ui-panels/src/dialog/modal.rs @@ -75,6 +75,9 @@ pub struct Dialog<'a> { /// Whether the title row has a close action. #[prop] closable: bool, + /// A muted note after the title. + #[prop(into)] + title_note: Option