summaryrefslogtreecommitdiff
path: root/tests/typeset.rs
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2022-05-02 18:48:32 +0200
committerMartin Haug <mhaug@live.de>2022-05-02 18:48:32 +0200
commit33213abe7dfcb8d8065faadd2f5b72ec4b718af1 (patch)
tree6763bcd9e8b50e3dcce4e08216127c3c8a492648 /tests/typeset.rs
parent9b4397cdab25daff448cefb179a4699f64fa3d3f (diff)
New page margins API
Diffstat (limited to 'tests/typeset.rs')
-rw-r--r--tests/typeset.rs10
1 files changed, 5 insertions, 5 deletions
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.