fn overview(app: &Studio, theme: &Theme) -> View<StudioAction> {
let plot = card(
"A live workspace",
"Synthetic signal / last 12 samples",
theme,
)
.width(percent(64))
.height(px(326))
.child(studio_row().children([
metric("84.2", "Signal strength", ORANGE, theme),
metric("12", "Sample points", TEAL, theme),
]))
.child(signal_chart(134));
let control = card("Try the controls", "Changes carry between pages.", theme)
.width(percent(34))
.height(px(326))
.child(
studio_row()
.justify_content(FlexAlign::SpaceBetween)
.align_items(ItemAlign::Center)
.align_content(FlexAlign::Center)
.child(metric(
&format!("{}%", app.value),
"Output level",
theme.text,
theme,
))
.child(
switch(app.enabled)
.focusable(true)
.on_value_changed(|v| StudioAction::Enabled(v != 0)),
),
)
.child(
slider(0, 100, app.value)
.key(Key::Named("overview-slider"))
.style(full(12))
.focusable(true)
.on_value_changed(StudioAction::Value),
)
.child(primary("Explore components", StudioAction::Page(1), theme).style(full(44)))
.child(text("Touch, click or use Tab + Enter.", theme));
studio_column()
.child(studio_row().children([plot, control]))
.child(
studio_row().children([
third(
card("Compose", "Small nodes. Complete interfaces.", theme),
242,
)
.child(
spans([
Span::new("App").color(ORANGE),
Span::new(" / View / "),
Span::new("Ui").color(TEAL),
])
.style(full(40).font(Font::montserrat_20())),
)
.child(action_button(
"Open composition",
StudioAction::Page(7),
theme,
)),
third(
card("Create", "Pixels, motion and vector media.", theme),
242,
)
.child(studio_row().children([
rs_lvgl_ui::image(sample_image(false)),
text("Made for your device.", theme),
]))
.child(action_button("Open media", StudioAction::Page(5), theme)),
third(
card("Connect", "A native engine, a Rust workflow.", theme),
242,
)
.child(
studio_row().height(px(38)).children([
led(TEAL)
.width(px(18))
.height(px(18))
.radius(9)
.shadow_width(0),
text("LVGL 9.6 / native rendering", theme),
]),
)
.child(action_button(
"Open a dialog",
StudioAction::Dialog(true),
theme,
)),
]),
)
}