From aa3a12b566da85006ed2cf4c6274b2cdea6877d2 Mon Sep 17 00:00:00 2001 From: Cameron Mcloughlin Date: Wed, 25 Feb 2026 15:14:20 +0000 Subject: [PATCH] sidebar: Zoom temporarily hides sidebar (#50088) Using zoom now temporarily hides the sidebar. Unzooming reopens the sidebar Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/workspace/src/multi_workspace.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/multi_workspace.rs b/crates/workspace/src/multi_workspace.rs index 478e33418c68efa1cf5da0868fe16d6dec693447..567c24f5d73887289445fb8367bdd950097ba073 100644 --- a/crates/workspace/src/multi_workspace.rs +++ b/crates/workspace/src/multi_workspace.rs @@ -623,6 +623,7 @@ impl MultiWorkspace { impl Render for MultiWorkspace { fn render(&mut self, window: &mut Window, cx: &mut Context) -> impl IntoElement { let multi_workspace_enabled = self.multi_workspace_enabled(cx); + let is_zoomed = self.workspace().read(cx).zoomed_item().is_some(); let sidebar: Option = if multi_workspace_enabled && self.sidebar_open { self.sidebar.as_ref().map(|sidebar_handle| { @@ -676,6 +677,7 @@ impl Render for MultiWorkspace { client_side_decorations( h_flex() .key_context("Workspace") + .relative() .size_full() .on_action( cx.listener(|this: &mut Self, _: &NewWorkspaceInWindow, window, cx| { @@ -722,12 +724,13 @@ impl Render for MultiWorkspace { .flex_1() .size_full() .overflow_hidden() + .when(is_zoomed, |this| this.absolute().inset_0()) .child(self.workspace().clone()), ), window, cx, Tiling { - left: multi_workspace_enabled && self.sidebar_open, + left: multi_workspace_enabled && self.sidebar_open && !is_zoomed, ..Tiling::default() }, )