Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

git_ui: Fix history view label truncation (#44218)

Danilo Leal3bb6c2546a1d
diff --git a/crates/git_ui/src/file_history_view.rs b/crates/git_ui/src/file_history_view.rs
index e34806aacae..5b3588d2967 100644
--- a/crates/git_ui/src/file_history_view.rs
+++ b/crates/git_ui/src/file_history_view.rs
@@ -267,15 +267,19 @@ impl FileHistoryView {
.child(self.render_commit_avatar(&entry.sha, window, cx))
.child(
h_flex()
+ .min_w_0()
.w_full()
.justify_between()
.child(
h_flex()
+ .min_w_0()
+ .w_full()
.gap_1()
.child(
Label::new(entry.author_name.clone())
.size(LabelSize::Small)
- .color(Color::Default),
+ .color(Color::Default)
+ .truncate(),
)
.child(
Label::new(&entry.subject)
@@ -285,9 +289,11 @@ impl FileHistoryView {
),
)
.child(
- Label::new(relative_timestamp)
- .size(LabelSize::Small)
- .color(Color::Muted),
+ h_flex().flex_none().child(
+ Label::new(relative_timestamp)
+ .size(LabelSize::Small)
+ .color(Color::Muted),
+ ),
),
),
)