From 4eeb6ae1391c6251030876241c2b1ec103cb7943 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 20 Nov 2026 19:19:17 -0500 Subject: [PATCH] Support trailing text beside hosted table fields --- crates/ui-widgets/src/list/row.rs | 10 ++++ crates/ui-widgets/src/list/row/paint.rs | 32 +++++++++++- crates/ui-widgets/src/list/row/show.rs | 10 ++++ crates/ui-widgets/tests/it/table.rs | 68 +++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 2 deletions(-) diff --git a/crates/ui-widgets/src/list/row.rs b/crates/ui-widgets/src/list/row.rs index 8696fb2a0..9de6c917d 100644 --- a/crates/ui-widgets/src/list/row.rs +++ b/crates/ui-widgets/src/list/row.rs @@ -379,6 +379,8 @@ pub struct ListRow<'a> { pub(super) below: Vec>, /// The components shown in a column's cell in place of its text (`cell_field`). pub(super) cell_fields: Vec<(ColumnKey, Hosted<'a>)>, + /// Columns whose field is followed by their text cell. + pub(super) field_suffixes: Vec, /// The row's depth in a tree, which indents it; `None` for a row of a flat list. /// The row is at `depth` levels of a tree: indented by it, an `AccessKit` tree item. #[prop] @@ -470,6 +472,7 @@ impl<'a> ListRow<'a> { trailing: Vec::new(), below: Vec::new(), cell_fields: Vec::new(), + field_suffixes: Vec::new(), depth: None, group: None, disclosure_by_host: false, @@ -612,6 +615,13 @@ impl<'a> ListRow<'a> { self } + /// Text following a hosted field in the same column. The field takes the room the text and their gap leave. + #[must_use] + pub fn cell_field_suffix(mut self, column: ColumnKey, text: impl Into