diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-12-30 12:12:19 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-12-30 12:12:19 +0100 |
| commit | f174134aa23e96a2121fb4106fb23fbdad4d641a (patch) | |
| tree | 7c842c8af3383805bbc7b835daecc71e8ba616e6 /src/library/columns.rs | |
| parent | 5d5d8a21cfc041ab08d30229f4ecb4cbb415cbc5 (diff) | |
Style chains
Diffstat (limited to 'src/library/columns.rs')
| -rw-r--r-- | src/library/columns.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library/columns.rs b/src/library/columns.rs index f5d06e56..17ae6058 100644 --- a/src/library/columns.rs +++ b/src/library/columns.rs @@ -34,6 +34,7 @@ impl Layout for ColumnsNode { &self, ctx: &mut LayoutContext, regions: &Regions, + styles: StyleChain, ) -> Vec<Constrained<Rc<Frame>>> { let columns = self.columns.get(); @@ -41,7 +42,7 @@ impl Layout for ColumnsNode { // much sense. Note that this line assumes that no infinitely wide // region will follow if the first region's width is finite. if regions.current.x.is_infinite() { - return self.child.layout(ctx, regions); + return self.child.layout(ctx, regions, styles); } // Gutter width for each region. (Can be different because the relative @@ -81,9 +82,9 @@ impl Layout for ColumnsNode { pod.backlog = sizes.into_iter(); let mut finished = vec![]; - let mut frames = self.child.layout(ctx, &pod).into_iter(); + let mut frames = self.child.layout(ctx, &pod, styles).into_iter(); - let dir = ctx.styles.get(ParNode::DIR); + let dir = styles.get(ParNode::DIR); let total_regions = (frames.len() as f32 / columns as f32).ceil() as usize; // Stitch together the columns for each region. |
