summaryrefslogtreecommitdiff
path: root/src/library/layout.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-25 12:10:44 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-25 12:10:44 +0200
commitc97b3078eb39995528302100d4e8b60c032cadd3 (patch)
tree2242630b093ab96a04e2b2796ea0fda95147942b /src/library/layout.rs
parentec5384c97f24c3e6d8284926fd3e415f47fe2b04 (diff)
Merge font and par state into text state
Diffstat (limited to 'src/library/layout.rs')
-rw-r--r--src/library/layout.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/layout.rs b/src/library/layout.rs
index cbc5ff94..ef909bc3 100644
--- a/src/library/layout.rs
+++ b/src/library/layout.rs
@@ -96,7 +96,7 @@ fn spacing_impl(ctx: &mut EvalContext, args: &mut FuncArgs, axis: GenAxis) -> Va
Value::template(move |ctx| {
if let Some(linear) = spacing {
// TODO: Should this really always be font-size relative?
- let amount = linear.resolve(ctx.state.font.size);
+ let amount = linear.resolve(ctx.state.text.size);
ctx.push_spacing(axis, amount);
}
})
@@ -124,7 +124,7 @@ pub fn align(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
Value::template(move |ctx| {
if let Some(horizontal) = horizontal {
- ctx.state.aligns.cross = horizontal.to_align(ctx.state.lang.dir);
+ ctx.state.aligns.cross = horizontal.to_align(ctx.state.dir);
}
if let Some(vertical) = vertical {
@@ -260,7 +260,7 @@ pub fn stack(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
.collect();
ctx.push_into_stack(StackNode {
- dirs: Gen::new(ctx.state.lang.dir, dir),
+ dirs: Gen::new(ctx.state.dir, dir),
aspect: None,
children,
});
@@ -290,7 +290,7 @@ pub fn grid(ctx: &mut EvalContext, args: &mut FuncArgs) -> Value {
.map(|child| ctx.exec_template_stack(child).into())
.collect();
- let cross_dir = column_dir.unwrap_or(ctx.state.lang.dir);
+ let cross_dir = column_dir.unwrap_or(ctx.state.dir);
let main_dir = row_dir.unwrap_or(cross_dir.axis().other().dir(true));
ctx.push_into_stack(GridNode {