diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-07-09 10:16:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 08:16:36 +0000 |
| commit | e5e1dcd9c01341d2cd3473ac94a70223d5966086 (patch) | |
| tree | d648efad9463cb10270d55ba35210eeb1e91ee22 /crates/typst-library/src/layout/stack.rs | |
| parent | 0a3c6939dd274f40672484695d909c2cc0d0d755 (diff) | |
Target-specific native show rules (#6569)
Diffstat (limited to 'crates/typst-library/src/layout/stack.rs')
| -rw-r--r-- | crates/typst-library/src/layout/stack.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/crates/typst-library/src/layout/stack.rs b/crates/typst-library/src/layout/stack.rs index 5fc78480..fca1ecb8 100644 --- a/crates/typst-library/src/layout/stack.rs +++ b/crates/typst-library/src/layout/stack.rs @@ -1,9 +1,7 @@ use std::fmt::{self, Debug, Formatter}; -use crate::diag::SourceResult; -use crate::engine::Engine; -use crate::foundations::{cast, elem, Content, NativeElement, Packed, Show, StyleChain}; -use crate::layout::{BlockElem, Dir, Spacing}; +use crate::foundations::{cast, elem, Content}; +use crate::layout::{Dir, Spacing}; /// Arranges content and spacing horizontally or vertically. /// @@ -19,7 +17,7 @@ use crate::layout::{BlockElem, Dir, Spacing}; /// rect(width: 90pt), /// ) /// ``` -#[elem(Show)] +#[elem] pub struct StackElem { /// The direction along which the items are stacked. Possible values are: /// @@ -47,14 +45,6 @@ pub struct StackElem { pub children: Vec<StackChild>, } -impl Show for Packed<StackElem> { - fn show(&self, engine: &mut Engine, _: StyleChain) -> SourceResult<Content> { - Ok(BlockElem::multi_layouter(self.clone(), engine.routines.layout_stack) - .pack() - .spanned(self.span())) - } -} - /// A child of a stack element. #[derive(Clone, PartialEq, Hash)] pub enum StackChild { |
