mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 00:57:26 +00:00
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 thatebf9254522removed, 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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user