From 18ab71d7d8f1dd2c7c8d588500bbc13064b740de Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 22 Nov 2026 01:41:06 -0500 Subject: [PATCH] Unsaved changes question: document wording and order, app title, question, note and icon (L-304) --- crates/ui-panels/src/dialog/unsaved.rs | 68 ++++++++++++++++++++++++-- crates/ui-panels/tests/it/dialogs.rs | 19 +++++++ 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/crates/ui-panels/src/dialog/unsaved.rs b/crates/ui-panels/src/dialog/unsaved.rs index 1a7346a34..6a3bfda43 100644 --- a/crates/ui-panels/src/dialog/unsaved.rs +++ b/crates/ui-panels/src/dialog/unsaved.rs @@ -10,6 +10,7 @@ use crate::runtime::env::{Env, Label}; use crate::runtime::overlay::CloseReason; use crate::runtime::words::CommonWords; use crate::sections::DialogRole; +use craft_behavior::IconId; use craft_host::target::Os; use craft_keymap::{Chord, Key, Mods}; use craft_quit::{CloseAnswer, CloseScope}; @@ -63,12 +64,27 @@ pub struct UnsavedChangesDialog { open: bool, /// What a programmatic OK answers; the accepting answer's when `None`. chosen: Option, + /// The buttons are worded and ordered as a document app's save question: Don't save, Cancel, Save. + document_wording: bool, + title: Option