From 592b03834d1f1e32eccf46805da24e98b2e36d1a Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Fri, 31 Jul 2026 21:36:56 +0200 Subject: [PATCH] add close button to the note title bar --- application/note/src/note.rs | 8 ++++++++ application/note/src/window.rs | 1 + 2 files changed, 9 insertions(+) diff --git a/application/note/src/note.rs b/application/note/src/note.rs index 175d965..305008b 100644 --- a/application/note/src/note.rs +++ b/application/note/src/note.rs @@ -390,6 +390,14 @@ impl Note { self.fixed_title = true; } + #[action] + pub fn note_title_close(&mut self, _event: &ActionEvent) { + let Some(doc) = self.doc.get_doc() else { + return; + }; + doc.ctx.unset_state(AppStates::NoteTitleInput as i32); + } + #[action] pub fn note_title_changed(&mut self, event: &ActionEvent) { if event.set { diff --git a/application/note/src/window.rs b/application/note/src/window.rs index 4d4ec77..3e20493 100644 --- a/application/note/src/window.rs +++ b/application/note/src/window.rs @@ -257,6 +257,7 @@ pub fn create_window(app: &App, ctx: &AppContext) -> UiObject