Expand description
§arama-theme
Token-driven styling for arama, backed by the Snora Design system (RFC 010) with a runtime-selectable theme preset (RFC 011).
§Three styling layers
A theme switch must move three layers together:
- A — Snora button tokens. The four button style functions below
(
primary,ghost,secondary,danger) resolve the activesnora::design::Tokensfrom the current preset. - B — Snora container tokens. Reserved for future card surfaces;
driven by the same [
tokens]. - C — Base iced theme.
iced_themereturns the matching icedThemefor the application’s.theme()callback, so the window background and all stock iced widgets track the preset.
§Global state
The active preset is stored in a global AtomicU8 — the same lock-free
pattern arama uses for the i18n locale — so set_theme and the lookup
functions are safe to call from any thread without lifetime friction in
view().
Functions§
- current_
theme - Return the currently active theme preset.
- danger
- Danger button style — destructive actions such as “Stop”.
- ghost
- Ghost (transparent) button style — token-driven equivalent of iced’s
button::text, used for inactive navigation items. - iced_
theme - The base iced
Themefor the active preset (layer C). - primary
- Primary (accent) button style — active navigation item, confirmations.
- secondary
- Secondary button style — non-primary actions such as “Skip”.
- set_
theme - Set the active theme preset. Safe to call from any thread.