From 33213abe7dfcb8d8065faadd2f5b72ec4b718af1 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Mon, 2 May 2022 18:48:32 +0200 Subject: New page margins API --- tests/typeset.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/typeset.rs') diff --git a/tests/typeset.rs b/tests/typeset.rs index 9f84a733..d3f7844b 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -12,7 +12,7 @@ use walkdir::WalkDir; use typst::diag::Error; use typst::eval::{Smart, Value}; use typst::frame::{Element, Frame}; -use typst::geom::{Length, RgbaColor}; +use typst::geom::{Length, RgbaColor, Sides}; use typst::library::layout::PageNode; use typst::library::text::{TextNode, TextSize}; use typst::loading::FsLoader; @@ -64,10 +64,10 @@ fn main() { let mut styles = StyleMap::new(); styles.set(PageNode::WIDTH, Smart::Custom(Length::pt(120.0).into())); styles.set(PageNode::HEIGHT, Smart::Auto); - styles.set(PageNode::LEFT, Smart::Custom(Length::pt(10.0).into())); - styles.set(PageNode::TOP, Smart::Custom(Length::pt(10.0).into())); - styles.set(PageNode::RIGHT, Smart::Custom(Length::pt(10.0).into())); - styles.set(PageNode::BOTTOM, Smart::Custom(Length::pt(10.0).into())); + styles.set( + PageNode::MARGINS, + Sides::splat(Smart::Custom(Length::pt(10.0).into())), + ); styles.set(TextNode::SIZE, TextSize(Length::pt(10.0).into())); // Hook up an assert function into the global scope. -- cgit v1.2.3