MCPcopy Create free account
hub / github.com/algoscienceacademy/RustUI / main

Function main

examples/src/styled_app.rs:20–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20fn 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}

Callers

nothing calls this directly

Calls 4

spacingMethod · 0.80
runMethod · 0.45
childMethod · 0.45
styleMethod · 0.45

Tested by

no test coverage detected