|
@@ -1,10 +1,9 @@
|
|
|
use super::{do_fit, ArrangementCalculator};
|
|
|
use crate::{
|
|
|
layout::{
|
|
|
- cache::{LayoutCacheKey, NodeState},
|
|
|
- LayoutNodeAccess, SizePolicy, TableCell, TableSize, SizePolicy2D,
|
|
|
+ LayoutNodeAccess, SizePolicy, SizePolicy2D,
|
|
|
},
|
|
|
- math::{PixelBox, PixelPoint, PixelSize},
|
|
|
+ math::{PixelBox, PixelPoint},
|
|
|
};
|
|
|
use std::ops::Add;
|
|
|
|
|
@@ -91,6 +90,8 @@ impl ArrangementCalculator for TableArrangement {
|
|
|
let mut row_offsets = vec![0];
|
|
|
row_offsets.extend(do_fit(inside.height(), tstate.row_policies.into_iter()));
|
|
|
|
|
|
+ let child_offset = inside.min.to_vector();
|
|
|
+
|
|
|
for ch in node.child_iter() {
|
|
|
let Some(cell) = ch.table_cell() else {
|
|
|
continue;
|
|
@@ -101,7 +102,7 @@ impl ArrangementCalculator for TableArrangement {
|
|
|
PixelPoint::new(col_offsets[cell.x + 1], row_offsets[cell.y + 1]),
|
|
|
);
|
|
|
|
|
|
- ch.child_arrangement.layout_step(ch, cbox);
|
|
|
+ ch.child_arrangement.layout_step(ch, cbox.translate(child_offset));
|
|
|
}
|
|
|
}
|
|
|
}
|