|
@@ -25,13 +25,6 @@ fn do_align(node: &LayoutNodeAccess, mut inside: PixelBox) -> PixelBox {
|
|
let net_policy = node
|
|
let net_policy = node
|
|
.with_state(|ns| ns.net_policy)
|
|
.with_state(|ns| ns.net_policy)
|
|
.expect("do_align invoked with node that has no net_policy");
|
|
.expect("do_align invoked with node that has no net_policy");
|
|
- println!("do_align | net: {net_policy:?}");
|
|
|
|
- println!(
|
|
|
|
- " | alignments: {:?} {:?}",
|
|
|
|
- node.halign(),
|
|
|
|
- node.valign()
|
|
|
|
- );
|
|
|
|
- println!(" | inside before: {inside:?}");
|
|
|
|
if net_policy.width.slack_weight == 0 {
|
|
if net_policy.width.slack_weight == 0 {
|
|
let slack = (inside.width() - net_policy.width.desired as i32).max(0);
|
|
let slack = (inside.width() - net_policy.width.desired as i32).max(0);
|
|
let hshrink = match node.halign() {
|
|
let hshrink = match node.halign() {
|
|
@@ -54,7 +47,6 @@ fn do_align(node: &LayoutNodeAccess, mut inside: PixelBox) -> PixelBox {
|
|
};
|
|
};
|
|
inside = inside.inner_box(vshrink);
|
|
inside = inside.inner_box(vshrink);
|
|
}
|
|
}
|
|
- println!(" | inside after: {inside:?}");
|
|
|
|
inside
|
|
inside
|
|
}
|
|
}
|
|
|
|
|