Kit · K03: init checks every bundled file through the app's source; Assets::before joins another source

This commit is contained in:
ZacharyZhang-NY committed 2026-10-07 13:23:23 -04:00
1 parent dabc1eb4d2
commit 98de2a455f
7 files changed
+119 -15

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ An Ely app is a GPUI app with four more parts: Ely's assets, one call to `init`,
| Part | Why |
| --- | --- |
| `gpui_platform::application().with_assets(Assets)` | Ely embeds its icons and fonts. `init` returns an error without them. |
| `gpui_platform::application().with_assets(Assets)` | Ely embeds its icons and fonts. `init` returns an error when the source cannot load one of them. |
| `ely_gpui_component::init(cx)?` | Call once, before any window. It returns an error if the asset source fails. It registers the fonts, sets the theme, and binds Tab, Shift-Tab and the keys of text fields, the code editor, documents and, natively, the terminal. |
| A root `FocusScope` | `FocusScope::new(&handle).root()` owns Tab for the window and takes focus back when the focused element leaves the tree. Focus its handle when the window opens. |
| `cx.theme()` | Colors, sizes and radii come from the theme. Components read it; an app's own boxes read it too. |