diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-08-21 19:08:47 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-08-21 19:08:47 +0200 |
| commit | c0377de653ed7c0ae0e253724cbbb622125fbd3f (patch) | |
| tree | d69237f632084f07ce04e6d877cdea451a03f295 /src/eval/template.rs | |
| parent | 0dd4ae0a7ac0c247078df492469ff20b8a90c886 (diff) | |
Shorter/clearer field name for geometry types
Size { width, height } => Size { w, h }
Spec { horizontal, vertical } => Spec { x, y }
Gen { cross, main } => Gen { inline, block }
Diffstat (limited to 'src/eval/template.rs')
| -rw-r--r-- | src/eval/template.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/eval/template.rs b/src/eval/template.rs index 92b3eb86..addbb466 100644 --- a/src/eval/template.rs +++ b/src/eval/template.rs @@ -308,7 +308,7 @@ impl Builder { /// Push an inline node into the active paragraph. fn inline(&mut self, node: impl Into<LayoutNode>) { - let align = self.state.aligns.cross; + let align = self.state.aligns.inline; self.stack.par.push(ParChild::Any(node.into(), align)); } @@ -323,11 +323,11 @@ impl Builder { /// Push spacing into the active paragraph or stack depending on the `axis`. fn spacing(&mut self, axis: GenAxis, amount: Linear) { match axis { - GenAxis::Main => { + GenAxis::Block => { self.stack.finish_par(&self.state); self.stack.push_hard(StackChild::Spacing(amount)); } - GenAxis::Cross => { + GenAxis::Inline => { self.stack.par.push_hard(ParChild::Spacing(amount)); } } @@ -351,7 +351,7 @@ impl Builder { fn make_text_node(&self, text: impl Into<EcoString>) -> ParChild { ParChild::Text( text.into(), - self.state.aligns.cross, + self.state.aligns.inline, Rc::clone(&self.state.font), ) } @@ -441,7 +441,7 @@ impl ParBuilder { fn new(state: &State) -> Self { Self { aligns: state.aligns, - dir: state.dirs.cross, + dir: state.dirs.inline, line_spacing: state.line_spacing(), children: vec![], last: Last::None, |
