diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-07-08 10:52:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-08 08:52:43 +0000 |
| commit | 0a3c6939dd274f40672484695d909c2cc0d0d755 (patch) | |
| tree | 465c10338230b895fdd06c8b3491f1734e8a2932 /crates/typst-layout/src/math/root.rs | |
| parent | 36ecbb2c8dccc1a31c43fee1466f1425844d8607 (diff) | |
Rewrite foundations of native elements (#6547)
Diffstat (limited to 'crates/typst-layout/src/math/root.rs')
| -rw-r--r-- | crates/typst-layout/src/math/root.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/typst-layout/src/math/root.rs b/crates/typst-layout/src/math/root.rs index 91b9b16a..30948e08 100644 --- a/crates/typst-layout/src/math/root.rs +++ b/crates/typst-layout/src/math/root.rs @@ -17,7 +17,7 @@ pub fn layout_root( ctx: &mut MathContext, styles: StyleChain, ) -> SourceResult<()> { - let index = elem.index(styles); + let index = elem.index.get_ref(styles); let span = elem.span(); let gap = scaled!( @@ -54,7 +54,7 @@ pub fn layout_root( let sqrt = sqrt.into_frame(); // Layout the index. - let sscript = EquationElem::set_size(MathSize::ScriptScript).wrap(); + let sscript = EquationElem::size.set(MathSize::ScriptScript).wrap(); let index = index .as_ref() .map(|elem| ctx.layout_into_frame(elem, styles.chain(&sscript))) @@ -112,7 +112,7 @@ pub fn layout_root( FrameItem::Shape( Geometry::Line(Point::with_x(radicand.width())).stroked( FixedStroke::from_pair( - TextElem::fill_in(styles).as_decoration(), + styles.get_ref(TextElem::fill).as_decoration(), thickness, ), ), |
