⎇ 3de41935b1054f945bfaeb40dfc213cd57366b9b
benches/generated/display_none_with_position.rs
Ñawpa willay
Pi imata llamkarqan
ch'uya
update tests and benchmarks to use new api
1pub fn compute() -> stretch::result::Layout {
2 stretch::node::Node::new(
3 stretch::style::Style {
4 size: stretch::geometry::Size {
5 width: stretch::style::Dimension::Points(100f32),
6 height: stretch::style::Dimension::Points(100f32),
7 ..Default::default()
8 },
9 ..Default::default()
10 },
11 vec![
12 &stretch::node::Node::new(stretch::style::Style { flex_grow: 1f32, ..Default::default() }, vec![]),
13 &stretch::node::Node::new(
14 stretch::style::Style {
15 display: stretch::style::Display::None,
16 flex_grow: 1f32,
17 position: stretch::geometry::Rect {
18 top: 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}