From 45d4b445ec9e0096e2deac699dd46dbb02a50636 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Tue, 8 Oct 2024 18:09:41 +0800 Subject: [PATCH] panel: Toggle to zoom out when close a panel. (#322) --- crates/ui/src/dock/tab_panel.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/ui/src/dock/tab_panel.rs b/crates/ui/src/dock/tab_panel.rs index cd4f468..39961c6 100644 --- a/crates/ui/src/dock/tab_panel.rs +++ b/crates/ui/src/dock/tab_panel.rs @@ -238,6 +238,7 @@ impl TabPanel { pub fn remove_panel(&mut self, panel: Arc, cx: &mut ViewContext) { self.detach_panel(panel, cx); self.remove_self_if_empty(cx); + cx.emit(PanelEvent::ZoomOut); cx.emit(PanelEvent::LayoutChanged); }