From e6220ad044fda12f65c5cf8559f29ee5a484377e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Wed, 7 Oct 2026 01:32:53 -0400 Subject: [PATCH] =?UTF-8?q?Git=20=C2=B7=20CommitItem:=20narrow,=20the=20de?= =?UTF-8?q?tails=20give=20way=20before=20the=20subject?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/git/commits.rs | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/git/commits.rs b/src/git/commits.rs index 09fccfa..12bed17 100644 --- a/src/git/commits.rs +++ b/src/git/commits.rs @@ -106,28 +106,27 @@ impl RenderOnce for CommitItem { .child( div() .flex_1() - .min_w_0() + .min_w_24() .text_color(colors.fg) .child(Ellipsis::new(commit.subject)), ) + // Narrow, the details give way before the subject. .child( div() - .flex_none() - .text_color(colors.fg_muted) - .child(commit.author), - ) - .child( - div() - .flex_none() - .font_family(theme.mono_family.clone()) - .text_color(colors.fg_subtle) - .child(short), - ) - .child( - div() - .flex_none() - .text_color(colors.fg_subtle) - .child(commit.when), + .flex_shrink() + .min_w_0() + .overflow_hidden() + .whitespace_nowrap() + .flex() + .gap_2() + .child(div().text_color(colors.fg_muted).child(commit.author)) + .child( + div() + .font_family(theme.mono_family.clone()) + .text_color(colors.fg_subtle) + .child(short), + ) + .child(div().text_color(colors.fg_subtle).child(commit.when)), ) } }