From 01fe3eec4d73f0b8b2e19b467861b16e1441bb8c Mon Sep 17 00:00:00 2001 From: Floyd Wang Date: Thu, 7 Mar 2024 16:18:59 +0800 Subject: [PATCH] Fix project panel icon bouncing when renaming (#8988) I found the project panel icon has a little bounce when I tried to rename some files. Release Notes: - Fix project panel icon bouncing when renaming. ## Before https://github.com/zed-industries/zed/assets/28998859/76f04c33-da68-40e2-9c83-045e78187679 **Set `buffer_line_height` to `standard`** https://github.com/zed-industries/zed/assets/28998859/9a9eca93-5fda-4060-ba1d-0cd4e0486eb8 ## After https://github.com/zed-industries/zed/assets/28998859/29b49f1c-a9ae-4281-8921-8f1d8dd74262 **Set `buffer_line_height` to `standard`** https://github.com/zed-industries/zed/assets/28998859/8f1ccbb5-fe0e-4905-97c4-cb7431e5dc46 --- crates/project_panel/src/project_panel.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs index b7ffcc0a1c..0dd6c6ddb2 100644 --- a/crates/project_panel/src/project_panel.rs +++ b/crates/project_panel/src/project_panel.rs @@ -1426,9 +1426,11 @@ impl ProjectPanel { }) .child( if let (Some(editor), true) = (Some(&self.filename_editor), show_editor) { - div().h_full().w_full().child(editor.clone()) + h_flex().h_6().w_full().child(editor.clone()) } else { - div().child(Label::new(file_name).color(filename_text_color)) + div() + .h_6() + .child(Label::new(file_name).color(filename_text_color)) } .ml_1(), )