makepad/examples/splash
Kevin Boos 601d96a080
Script reloads: keep a list's tailing state, re-apply cached widgets, and theme CalloutTooltip (#1315)
* PortalList: keep the tailing state across a reload

`auto_tail` turned `tail_range` back on for every apply, including a style reload
or an Android/iOS rotation, which pulled a list the user had scrolled up back to its end.
Now only a new list starts out following its end.

* CachedWidget: re-apply a cached widget that missed a reload

A cached widget that nothing held during a reload (e.g. one that only lives in an
AdaptiveView's inactive variant, or in a lazily built page) kept its old styling,
since adopting it from the cache never re-applied its template.
* `Cx::reload_generation` counts the whole-tree reload walks
* `CachedWidget` records the generation each widget was last applied at,
  and requests a script reapply when it adopts one that's out of date

* CalloutTooltip: take its default colors from Splash

`CalloutTooltipOptions::default()` hardcoded the text and background colors in Rust,
and `draw_walk` always applied them, so apps couldn't theme their tooltips.
The options' colors are now `Option`s; `None` uses the tooltip's own `text_color`/`bg_color`,
which default to the same values as before.
2026-10-21 16:01:56 +02:00
..
resources fix svg 2026-02-08 21:17:46 +01:00
src Script reloads: keep a list's tailing state, re-apply cached widgets, and theme CalloutTooltip (#1315) 2026-10-21 16:01:56 +02:00
tests apps, examples: the window manager on Android and Windows, the phone layouts, the task manager, director, mail and the rest; Flow, the asset UI and VJ move to Stage 2026-09-26 20:10:58 +02:00
Cargo.toml apps, examples: the window manager on Android and Windows, the phone layouts, the task manager, director, mail and the rest; Flow, the asset UI and VJ move to Stage 2026-09-26 20:10:58 +02:00
README.md platform2/draw2 otw 2025-11-30 14:56:53 +01:00

makepad-example-simple

A very simple example of a Makepad Framework application, used to illustrate the basic concepts of Makepad Framework. For an explanation of what Makepad Framework is, please see the README for the makepad-widgets crate.

The example consists of a chromeless window containing both a button and a label displaying a counter. Clicking the buttnon will increment the counter. It illustrates the basics of initializing an application, handling events, drawing the UI, and working with the DSL.

The code for this example is fairly well commented, so it should be a good starting point for playing around with Makepad Framework.

Contact

If you have any questions/suggestions, feel free to reach out to us on our discord channel: https://discord.com/invite/urEMqtMcSd=