ui-widgets: a tile grid that takes its width from its content asks for at least one card again

The merge of next (b138b533fe) brought back the early zero width that ebf9254522 removed, so a measured stack lost the
grid's rows and what follows them. The selectable-text trial names its canvas with Id::unique.
This commit is contained in:
aiongg
2026-11-24 03:28:05 +00:00
parent 3b200f43d6
commit 8ef406cd5d
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -1042,9 +1042,6 @@ impl<K: Clone + Eq + Hash + Send + Sync + 'static> Collection for TileGrid<'_, K
/// The last layout again while the width, the rows stamp and everything the arrangement reads are the same.
fn ideal_width(&self, item: Option<Vec2>, _rows: usize, cx: &StyleCx<'_>) -> f32 {
if self.card_columns == 0 {
return 0.0;
}
let style = GridSizes::of(cx, self.card, self.card_text, self.items.row_height, self.regular_card_padding, self.action_place);
let aspect = if self.aspect.is_finite() && self.aspect > 0.0 { self.aspect } else { 1.0 };
let around = style.around.get(self.caption, self.detail_line);
@@ -153,7 +153,7 @@ fn metadata_value_copies_without_selecting_the_row() {
fn tab_toggles_the_panels_from_read_only_text_a_press_or_drag_focused() {
let text = Rc::new(Cell::new(Id::NULL));
let seen = text.clone();
let canvas = Id::new("document canvas");
let canvas = Id::unique("document canvas");
let mut fixture = Fixture::new(move |ui| {
Button::new("Save").show(ui);
seen.set(SelectableText::new("Path", "/projects/poster.indd").show(ui).id);