diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-25 21:32:33 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-25 21:32:33 +0100 |
| commit | 76fc4cca62f5b955200b2c62cc85b69eea491ece (patch) | |
| tree | 5b8492268c996cf23b13e26c7a4356fbd156286d /src/layout/fixed.rs | |
| parent | e8057a53856dc09594c9e5861f1cd328531616e0 (diff) | |
Refactor alignments & directions 📐
- Adds lang function
- Refactors execution context
- Adds StackChild and ParChild enums
Diffstat (limited to 'src/layout/fixed.rs')
| -rw-r--r-- | src/layout/fixed.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/fixed.rs b/src/layout/fixed.rs index 22c45ef1..04ea5a3a 100644 --- a/src/layout/fixed.rs +++ b/src/layout/fixed.rs @@ -12,11 +12,11 @@ pub struct FixedNode { /// The resulting frame will satisfy `width = aspect * height`. pub aspect: Option<f64>, /// The child node whose size to fix. - pub child: Node, + pub child: AnyNode, } impl Layout for FixedNode { - fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Fragment { + fn layout(&self, ctx: &mut LayoutContext, areas: &Areas) -> Vec<Frame> { let Areas { current, full, .. } = areas; let full = Size::new( |
