Expand description
The look shared by the sapphire apps and asteria: what an egui app’s window is made of before any of its own screens.
Shell is the window frame: the app’s screens on a rail (a bottom bar when narrow, as
on a phone), with a footer for Settings and a slot of the app’s own. fonts finds a
CJK fallback font on the system; icons is a set of Lucide icons and the SVG loader
that draws them; theme is the colours — light and dark, the contrast, the accent;
i18n is the translations — every string looked up by id in the user’s language,
through tr!. settings is the Settings screen: the pages an app and the
frameworks under it put in, the tabs of the scopes a setting can be kept in, and the
theme and the language over them. detail is a main view’s detail pane: a right
column beside it, a card over it, or on a phone the screen in its place; its column’s
toggle sits at the right end of the shell’s status bar.
The components depend on egui alone, so they render inside any host’s egui context, on
the desktops and on phones. With the eframe feature (on by default), window::run
opens a desktop window on wgpu the same way for every app, set up by gpu; an app that
renders egui without eframe turns default features off.
Re-exports§
Modules§
- detail
DetailPane: what the main view’s item holds — the playlist playing, the journal open — beside it, over it, or in its place — andtoggle_ui, the button turning its column on and off, which theShell’s status bar holds.- fonts
- A CJK fallback font from the operating system, so apps ship no font assets.
- gpu
- Renderer setup: backend selection and device-loss reporting.
- i18n
- The translations: every string the user reads, looked up by id in the language the user chose.
- icons
- The Lucide icons (ISC license,
assets/icons/LICENSE-Lucide) shared by the apps. - logcat
tracingto logcat: on Android a process’s stderr goes nowhere.- platform
- What a window needs from the platform and egui cannot give it: the clipboard where egui has none, and the margins the system’s bars and keyboard take (Android).
- settings
- The settings screen, and the pieces its pages are made of.
- theme
- The colours: light and dark, three contrast levels, an accent of the user’s.
- window
- A desktop window: eframe on wgpu, with the renderer set up by
gpuand a CJK font behind egui’s own.
Macros§
Structs§
- Action
- A button of the app’s on the rail that does something — “new-entry” — rather than
open a screen.
Shell::take_actionsays which one was clicked. - Destination
- One of the app’s screens on the rail.
- Shell
- The window frame. Hold one as the app’s root; call
uievery frame.
Constants§
- COMPACT_
WIDTH - Below this width the layout is a phone’s: the rail becomes a bottom bar, and screens with a list and a page show one at a time.