summaryrefslogtreecommitdiff
path: root/library/src/layout/table.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 13:02:41 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 14:35:33 +0100
commitd7a65fa26d131179d9d82226e5ee1b562084e48a (patch)
treec21ab20e9fb851e14e1ebea3e14fc351b1fdbcc9 /library/src/layout/table.rs
parente5eab73374880077971f3f22acbdd3d302877128 (diff)
Rework style chain access
Diffstat (limited to 'library/src/layout/table.rs')
-rw-r--r--library/src/layout/table.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/src/layout/table.rs b/library/src/layout/table.rs
index 0083a7bf..1bd47df0 100644
--- a/library/src/layout/table.rs
+++ b/library/src/layout/table.rs
@@ -128,8 +128,8 @@ impl Layout for TableNode {
styles: StyleChain,
regions: Regions,
) -> SourceResult<Fragment> {
- let inset = styles.get(Self::INSET);
- let align = styles.get(Self::ALIGN);
+ let inset = Self::inset_in(styles);
+ let align = Self::align_in(styles);
let tracks = Axes::new(self.columns().0, self.rows().0);
let gutter = Axes::new(self.column_gutter().0, self.row_gutter().0);
@@ -144,15 +144,15 @@ impl Layout for TableNode {
let x = i % cols;
let y = i / cols;
if let Smart::Custom(alignment) = align.resolve(vt, x, y)? {
- child = child.styled(AlignNode::ALIGNMENT, alignment)
+ child = child.styled(AlignNode::set_alignment(alignment));
}
Ok(child)
})
.collect::<SourceResult<_>>()?;
- let fill = styles.get(Self::FILL);
- let stroke = styles.get(Self::STROKE).map(PartialStroke::unwrap_or_default);
+ let fill = Self::fill_in(styles);
+ let stroke = Self::stroke_in(styles).map(PartialStroke::unwrap_or_default);
// Prepare grid layout by unifying content and gutter tracks.
let layouter = GridLayouter::new(