From 7b613cb16913bd73a734059e2a7f2524deebe66f Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Tue, 13 Aug 2024 11:37:29 -0400 Subject: [PATCH] Revert "Remove extra empty space for files when file icons are turned off (#16142) (#16167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR reverts #16142, as it isn't what we want from a design standpoint. Having the file names misaligned from the folder names is not the desired behavior: Screenshot 2024-08-13 at 11 16 53 AM We can revisit when we have design bandwidth. This reverts commit ee6a40137f21998a1b82df480c81207ec569fc98. Release Notes: - Reverted #16142. - @JosephTLyons @notpeter for release notes curation --- crates/project_panel/src/project_panel.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index d5b466b933..d4fa0eff41 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -2120,12 +2120,13 @@ impl ProjectPanel { .into_any_element(), ) }) - .when_some(icon, |this, icon| { - this.child( - h_flex().child( - Icon::from_path(icon.to_string()).color(filename_text_color), - ), - ) + .child(if let Some(icon) = &icon { + h_flex().child(Icon::from_path(icon.to_string()).color(filename_text_color)) + } else { + h_flex() + .size(IconSize::default().rems()) + .invisible() + .flex_none() }) .child( if let (Some(editor), true) = (Some(&self.filename_editor), show_editor) {