Files
Liu dc0ab38546 feat(styles): add switchable accent color themes
- generate an override stylesheet for each preset from style-nova
- add the ui_theme_* API, custom colors and single-slot loading
- persist the choice and add the navbar color picker
- keep badge variants, tooltip arrows and swatches consistent
2026-11-21 23:26:31 +08:00

31 lines
849 B
C

#ifndef APP_THEME_H
#define APP_THEME_H
/*
* app/theme.h - Color theme resolution and persistence.
*
* The doc-viewer ships a "light" and a "dark" theme. The current theme
* is persisted through lcui_settings under [app] theme; unknown values
* fall back to "light".
*/
/* Returns "light" or "dark". */
const char *app_get_theme(void);
/* Persists the given theme. Unknown values are stored as "light". */
void app_set_theme(const char *theme);
/* Applies the persisted theme to ui_root() (adds/removes the `dark` class). */
void app_apply_theme(void);
/* Returns the persisted accent name, or a custom "#RRGGBB" value. */
const char *app_get_accent(void);
/* Persists the accent name or custom color. */
void app_set_accent(const char *accent);
/* Applies the persisted accent to the UI theme. */
void app_apply_accent(void);
#endif