|
ginnOS
The reference: libc, the libraries and the kernel
|
idunn: the design tokens and the theme file. More...
Functions | |
| void | idunn_theme_default (idunn_theme_t *theme) |
| the default theme: dark, rose, 13 px text, 6 px radius. | |
| bool | idunn_theme_fit (idunn_theme_t *theme, int32_t screen_width) |
| set the scale for a screen when the theme's scale is auto. | |
| void | idunn_theme_from_conf (idunn_theme_t *theme, const conf_t *conf) |
| a theme from a theme file (or from text, for tests); missing or bad values keep their defaults. | |
| void | idunn_theme_load (idunn_theme_t *theme) |
| read the user's theme (conf_open("theme")). | |
| const char * | idunn_color_name (idunn_color_t which) |
| the name of a colour token in the theme file ("muted-foreground"), or NULL. | |
| int32_t | idunn_radius (const idunn_theme_t *theme) |
| buttons, inputs, list rows | |
| int32_t | idunn_radius_sm (const idunn_theme_t *theme) |
| check boxes, small items in menus: half the radius | |
| int32_t | idunn_radius_lg (const idunn_theme_t *theme) |
| cards, dialogs, popovers, windows: the radius + 4 | |
| idunn_text_style_t | idunn_text_style (const idunn_theme_t *theme, idunn_text_t which) |
| a text style at the theme's font size and scale. | |
| int | idunn_shadow (const idunn_theme_t *theme, idunn_shadow_t which, gfx_shadow_t layers[IDUNN_SHADOW_LAYERS]) |
| the layers of a shadow, in the order to draw them (the CSS list from its end), at the theme's scale. | |
idunn: the design tokens and the theme file.
the values are the agreed look (plans/idunn-ui-plan.md, section 2, and the "refined" preview). a theme is made in four steps: the table of its mode, the accent, the tokens made from the accent, and last the tokens the theme file changes for the mode.
| void idunn_theme_default | ( | idunn_theme_t * | theme | ) |
the default theme: dark, rose, 13 px text, 6 px radius.
| bool idunn_theme_fit | ( | idunn_theme_t * | theme, |
| int32_t | screen_width ) |
set the scale for a screen when the theme's scale is auto.
| void idunn_theme_from_conf | ( | idunn_theme_t * | theme, |
| const conf_t * | conf ) |
a theme from a theme file (or from text, for tests); missing or bad values keep their defaults.
| void idunn_theme_load | ( | idunn_theme_t * | theme | ) |
read the user's theme (conf_open("theme")).
| const char * idunn_color_name | ( | idunn_color_t | which | ) |
the name of a colour token in the theme file ("muted-foreground"), or NULL.
| int32_t idunn_radius | ( | const idunn_theme_t * | theme | ) |
buttons, inputs, list rows
| int32_t idunn_radius_sm | ( | const idunn_theme_t * | theme | ) |
check boxes, small items in menus: half the radius
| int32_t idunn_radius_lg | ( | const idunn_theme_t * | theme | ) |
cards, dialogs, popovers, windows: the radius + 4
| idunn_text_style_t idunn_text_style | ( | const idunn_theme_t * | theme, |
| idunn_text_t | which ) |
a text style at the theme's font size and scale.
| int idunn_shadow | ( | const idunn_theme_t * | theme, |
| idunn_shadow_t | which, | ||
| gfx_shadow_t | layers[IDUNN_SHADOW_LAYERS] ) |
the layers of a shadow, in the order to draw them (the CSS list from its end), at the theme's scale.