diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-17 14:38:48 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-23 20:23:47 +0200 |
| commit | 5becb32ba463d6b0ace914ab06bb237483a94fbc (patch) | |
| tree | 684efb242ddb04e71c54f9665cc59891f734e518 /src/eval/walk.rs | |
| parent | c627847cb39572c08f3b53db07ea325ef0d352fa (diff) | |
Introduce page / block / inline levels
Diffstat (limited to 'src/eval/walk.rs')
| -rw-r--r-- | src/eval/walk.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/eval/walk.rs b/src/eval/walk.rs index 24284e4e..2f44f5df 100644 --- a/src/eval/walk.rs +++ b/src/eval/walk.rs @@ -2,7 +2,7 @@ use std::rc::Rc; use super::{Eval, EvalContext, Str, Template, Value}; use crate::diag::TypResult; -use crate::geom::{Align, SpecAxis}; +use crate::geom::Align; use crate::layout::{ParChild, ParNode, StackChild, StackNode}; use crate::syntax::*; use crate::util::BoolExt; @@ -108,7 +108,7 @@ fn walk_item(ctx: &mut EvalContext, label: Str, body: Template) { ctx.template += Template::from_block(move |style| { let label = ParNode { dir: style.dir, - line_spacing: style.line_spacing(), + leading: style.leading(), children: vec![ParChild::Text( (&label).into(), style.aligns.inline, @@ -119,9 +119,9 @@ fn walk_item(ctx: &mut EvalContext, label: Str, body: Template) { StackNode { dir: style.dir, children: vec![ - StackChild::new(label, Align::Start), - StackChild::spacing(style.text.size / 2.0, SpecAxis::Horizontal), - StackChild::new(body.to_stack(&style), Align::Start), + StackChild::Any(label.into(), Align::Start), + StackChild::Spacing((style.text.size / 2.0).into()), + StackChild::Any(body.to_stack(&style).into(), Align::Start), ], } }); |
