egui_components_theme/presets.rs
1//! Bundled themes generated at compile time from
2//! [longbridge/gpui-component's `themes/*.json`](https://github.com/longbridge/gpui-component/tree/main/themes).
3//!
4//! Each entry is a `pub const NAME: Theme = …;`. Use [`ALL`] to enumerate
5//! every bundled theme, or [`by_name`] for runtime lookup.
6
7use crate::theme::{Theme, ThemeMode};
8use crate::tokens::ThemeColor;
9use egui::Color32;
10
11/// A bundled theme alongside the file-stem grouping it came from (`family`),
12/// e.g. `"catppuccin"` for all four Catppuccin variants. Useful for finding
13/// the light/dark counterpart of a chosen theme.
14#[derive(Clone, Copy, Debug)]
15pub struct Preset {
16 pub name: &'static str,
17 pub family: &'static str,
18 pub theme: Theme,
19}
20
21include!(concat!(env!("OUT_DIR"), "/presets_generated.rs"));