From: Olaf Wintermann Date: Fri, 31 Jul 2026 19:36:56 +0000 (+0200) Subject: add close button to the note title bar X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=HEAD;p=note.git add close button to the note title bar --- 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