()
| 18 | } |
| 19 | |
| 20 | fn main() { |
| 21 | let rust_native = RustUI::new(); |
| 22 | |
| 23 | rust_native.run(|| { |
| 24 | let view = View::new() |
| 25 | .child( |
| 26 | Text::new("Welcome") |
| 27 | .style(Style::new() |
| 28 | .set("font-size", 24.0) |
| 29 | .set("color", Color::new(0.1, 0.1, 0.1, 1.0))) |
| 30 | ) |
| 31 | .child( |
| 32 | Stack::new(Direction::Horizontal) |
| 33 | .spacing(8.0) |
| 34 | .child(Button::new("Login")) |
| 35 | .child(Button::new("Register")) |
| 36 | ); |
| 37 | |
| 38 | Box::new(StyledApp { view }) |
| 39 | }); |
| 40 | } |