Render an empty placeholder when not showing file icons in the project panel (#3897)

This PR makes it so when we're not showing file icons in the project
panel we render an empty placeholder instead of nothing.

This prevents the indentation of the items in the file tree from
changing based on the presence of the icon.

Release Notes:

- Fixed layout shift when `project_panel.file_icons` is set to `false`.
This commit is contained in:
Marshall Bowers authored and GitHub committed 2024-01-04 17:10:08 -05:00
1 parent 7ae7f15800
commit 55d36fd7ec
1 file changed
+1 -1
+1 -1
View File
@@ -1395,7 +1395,7 @@ impl ProjectPanel {
.child(if let Some(icon) = &icon {
div().child(IconElement::from_path(icon.to_string()).color(Color::Muted))
} else {
div()
div().size(IconSize::default().rems()).invisible()
})
.child(
if let (Some(editor), true) = (Some(&self.filename_editor), show_editor) {