Resolve deferred size comparisons before allocating span slots
This commit is contained in:
1 parent
de1eb7e406
commit
8780b40bb7
23 files changed
+1471
-130
No files matched your search
@@ -213,7 +213,7 @@ fn resize_one(warm: &mut Harness, tree: &Tree, idx: usize, rng: &mut Rng) -> Siz
|
||||
};
|
||||
warm.rsc
|
||||
.widgets_mut()
|
||||
.set_size_rules(tree.sized[idx], lens.x, lens.y);
|
||||
.set_size_rules(tree.sized[idx], lens.x.clone(), lens.y.clone());
|
||||
lens
|
||||
}
|
||||
|
||||
@@ -362,6 +362,7 @@ fn describe(id: WidgetId, h: &Harness) -> String {
|
||||
let rule = |r: SizeRule| match r {
|
||||
SizeRule::Free => "-".into(),
|
||||
SizeRule::Exact(len) => format!("{len}"),
|
||||
SizeRule::Request(request) => format!("{request:?}"),
|
||||
SizeRule::Min(min) => format!(">{}", LayoutLen::from(min)),
|
||||
SizeRule::Max(max) => format!("<{}", LayoutLen::from(max)),
|
||||
SizeRule::Clamp { min, max } => {
|
||||
@@ -383,7 +384,7 @@ fn describe(id: WidgetId, h: &Harness) -> String {
|
||||
// A rule and an alignment are properties of whatever carries them, so
|
||||
// they print with that widget rather than as widgets of their own.
|
||||
let mut out = describe_widget(id, h);
|
||||
if (rules.x, rules.y) != (SizeRule::Free, SizeRule::Free) {
|
||||
if rules != SizeRules::default() {
|
||||
out += &format!("[x:{},y:{}]", rule(rules.x), rule(rules.y));
|
||||
}
|
||||
if align != RegionAlign::default() {
|
||||
|
||||
Reference in new issue
Block a user