diff options
| author | Martin Haug <mhaug@live.de> | 2022-05-03 11:40:27 +0200 |
|---|---|---|
| committer | Martin Haug <mhaug@live.de> | 2022-05-03 12:59:41 +0200 |
| commit | 6a8a0ec6ec8bb8cf346ee0dd2c45ddcfbee7fbe6 (patch) | |
| tree | 0d8716d2fa0c01a2319bb84be0283253bc6490fe /src/library/layout/page.rs | |
| parent | 33213abe7dfcb8d8065faadd2f5b72ec4b718af1 (diff) | |
Code Review: Heap is Stack. Unsafe is Good.
Spaghetti Code is Style.
Diffstat (limited to 'src/library/layout/page.rs')
| -rw-r--r-- | src/library/layout/page.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/library/layout/page.rs b/src/library/layout/page.rs index 801a137d..c8495e64 100644 --- a/src/library/layout/page.rs +++ b/src/library/layout/page.rs @@ -20,7 +20,8 @@ impl PageNode { /// The page margin. #[property(fold)] - pub const MARGINS: Sides<Smart<Relative<RawLength>>> = Sides::splat(Smart::Auto); + pub const MARGINS: Sides<Option<Smart<Relative<RawLength>>>> = + Sides::splat(Smart::Auto); /// How many columns the page has. pub const COLUMNS: NonZeroUsize = NonZeroUsize::new(1).unwrap(); @@ -48,9 +49,7 @@ impl PageNode { styles.set_opt(Self::WIDTH, args.named("width")?); styles.set_opt(Self::HEIGHT, args.named("height")?); - styles.set_opt(Self::MARGINS, args.named("margins")?); - styles.set_opt(Self::FLIPPED, args.named("flipped")?); styles.set_opt(Self::FILL, args.named("fill")?); styles.set_opt(Self::COLUMNS, args.named("columns")?); |
