diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-08 13:02:41 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-08 14:35:33 +0100 |
| commit | d7a65fa26d131179d9d82226e5ee1b562084e48a (patch) | |
| tree | c21ab20e9fb851e14e1ebea3e14fc351b1fdbcc9 /tests/src/tests.rs | |
| parent | e5eab73374880077971f3f22acbdd3d302877128 (diff) | |
Rework style chain access
Diffstat (limited to 'tests/src/tests.rs')
| -rw-r--r-- | tests/src/tests.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/src/tests.rs b/tests/src/tests.rs index a86715ef..b35ddcce 100644 --- a/tests/src/tests.rs +++ b/tests/src/tests.rs @@ -178,11 +178,13 @@ fn library() -> Library { // Set page width to 120pt with 10pt margins, so that the inner page is // exactly 100pt wide. Page height is unbounded and font size is 10pt so // that it multiplies to nice round numbers. - lib.styles.set(PageNode::WIDTH, Smart::Custom(Abs::pt(120.0).into())); - lib.styles.set(PageNode::HEIGHT, Smart::Auto); lib.styles - .set(PageNode::MARGIN, Sides::splat(Some(Smart::Custom(Abs::pt(10.0).into())))); - lib.styles.set(TextNode::SIZE, TextSize(Abs::pt(10.0).into())); + .set(PageNode::set_width(Smart::Custom(Abs::pt(120.0).into()))); + lib.styles.set(PageNode::set_height(Smart::Auto)); + lib.styles.set(PageNode::set_margin(Sides::splat(Some(Smart::Custom( + Abs::pt(10.0).into(), + ))))); + lib.styles.set(TextNode::set_size(TextSize(Abs::pt(10.0).into()))); // Hook up helpers into the global scope. lib.global.scope_mut().def_func::<TestFunc>("test"); |
