Skip to content

Commit

Permalink
Remove extra empty space for files when file icons are turned off (ze…
Browse files Browse the repository at this point in the history
…d-industries#16142)

Closes zed-industries#16073

<img width="269" alt="image" src="https://github.com/user-attachments/assets/88b7ff9f-17ec-4764-b37a-c218d7ad14ec">

Release Notes:

- Removed extra empty space for files when file icons are turned off ([zed-industries#16073](zed-industries#16073))
  • Loading branch information
uladkaminski authored Aug 13, 2024
1 parent 1c189e8 commit ee6a401
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions crates/project_panel/src/project_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2120,13 +2120,12 @@ impl ProjectPanel {
.into_any_element(),
)
})
.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()
.when_some(icon, |this, icon| {
this.child(
h_flex().child(
Icon::from_path(icon.to_string()).color(filename_text_color),
),
)
})
.child(
if let (Some(editor), true) = (Some(&self.filename_editor), show_editor) {
Expand Down

0 comments on commit ee6a401

Please sign in to comment.