From ceb5d0c69ef5ec777f1756ca25bf6d0caf988208 Mon Sep 17 00:00:00 2001 From: Federico Dionisi Date: Tue, 5 Dec 2023 19:31:20 +0100 Subject: [PATCH] Dismiss theme_selector on esc --- crates/theme_selector2/src/theme_selector.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/theme_selector2/src/theme_selector.rs b/crates/theme_selector2/src/theme_selector.rs index 582ce43a88..3c6cae297c 100644 --- a/crates/theme_selector2/src/theme_selector.rs +++ b/crates/theme_selector2/src/theme_selector.rs @@ -187,6 +187,10 @@ impl PickerDelegate for ThemeSelectorDelegate { Self::set_theme(self.original_theme.clone(), cx); self.selection_completed = true; } + + self.view + .update(cx, |_, cx| cx.emit(DismissEvent)) + .log_err(); } fn selected_index(&self) -> usize {