From 720971e47b30ae88649cc62eda3230bd4836742c Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Mon, 29 Sep 2025 12:06:15 +0200 Subject: [PATCH] git_ui: Fix last commit UI glitching on panel resize (#39059) # Why Spotted that on Git Panel resize last commit UI part could glitch due to commit message being wrapped into second line in certain situations. # How Force only one line for the last commit message in Git Panel via `line_clamp`. I have also remove manual `max-width` setting since it is controlled by flex layout and gap setting no matter if there is an additional element on the right or not. Release Notes: - Fixed last commit UI glitching on panel resize # Preview ### Before https://github.com/user-attachments/assets/9ce74f6f-d33c-4787-b7e4-010de8f0ffff Screenshot 2025-09-28 at 18 16 35 ### After https://github.com/user-attachments/assets/279b8c37-7ec9-4038-8761-197cba26aa83 --- crates/git_ui/src/git_panel.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs index e08dc1d1967adf2b05b7d8eaf2a85590ad5bdd01..d97f62823317a77cf31c20562b0912a4efc8d27e 100644 --- a/crates/git_ui/src/git_panel.rs +++ b/crates/git_ui/src/git_panel.rs @@ -3527,7 +3527,7 @@ impl GitPanel { div() .flex_grow() .overflow_hidden() - .max_w(relative(0.85)) + .line_clamp(1) .child( Label::new(commit.subject.clone()) .size(LabelSize::Small)