glassy_ui/theme/mod.rs
1//! Process-wide light/dark theme for Glassy UI.
2//!
3//! ```ignore
4//! use glassy_ui::{init_theme, ActiveTheme, Theme};
5//!
6//! fn main() {
7//! application().run(|cx| {
8//! init_theme(cx);
9//! // later, anywhere you have App / Context:
10//! let theme = cx.theme();
11//! div().bg(theme.canvas).text_color(theme.ink);
12//! cx.toggle_theme();
13//! });
14//! }
15//! ```
16
17mod active;
18mod tokens;
19
20pub use active::{init, ActiveTheme};
21pub use tokens::{paint, rgb, Theme, ThemeKind, FONT_FAMILY};