gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 492HTML 238TOML 3CSS 11131 Definiciones

⎇ 3de41935b1054f945bfaeb40dfc213cd57366b9b benches/generated/flex_basis_larger_than_content_column.rs Rust · 29 líneas · 1.1 KB Historia Quién tocó qué crudo

update tests and benchmarks to use new api 1f8c44154 · Emil Sjölander ·

1pub fn compute() -> stretch::result::Layout {
2    stretch::node::Node::new(
3        stretch::style::Style {
4            flex_direction: stretch::style::FlexDirection::Column,
5            size: stretch::geometry::Size { height: stretch::style::Dimension::Points(100f32), ..Default::default() },
6            ..Default::default()
7        },
8        vec![&stretch::node::Node::new(
9            stretch::style::Style {
10                flex_direction: stretch::style::FlexDirection::Column,
11                flex_basis: stretch::style::Dimension::Points(50f32),
12                ..Default::default()
13            },
14            vec![&stretch::node::Node::new(
15                stretch::style::Style {
16                    size: stretch::geometry::Size {
17                        width: stretch::style::Dimension::Points(100f32),
18                        height: stretch::style::Dimension::Points(10f32),
19                        ..Default::default()
20                    },
21                    ..Default::default()
22                },
23                vec![],
24            )],
25        )],
26    )
27    .compute_layout(stretch::geometry::Size::undefined())
28    .unwrap()
29}