93#define IDUNN_SHADOW_LAYERS 4
123#define IDUNN_HIDPI_WIDTH 2400
147 return px * theme->
scale;
settings files: sections of "key = value" lines.
struct conf conf_t
Definition conf.h:37
libgfx: drawing into pixel buffers in memory.
uint32_t gfx_color_t
a premultiplied ARGB colour, 0xAARRGGBB.
Definition gfx.h:30
#define IDUNN_SHADOW_LAYERS
Definition idunn_theme.h:93
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.
Definition theme.c:324
idunn_shadow_t
Definition idunn_theme.h:86
@ IDUNN_SHADOW_XS
Definition idunn_theme.h:87
@ IDUNN_SHADOW_MD
Definition idunn_theme.h:88
@ IDUNN_SHADOW_COUNT
Definition idunn_theme.h:90
@ IDUNN_SHADOW_WINDOW
Definition idunn_theme.h:89
idunn_mode_t
Definition idunn_theme.h:27
@ IDUNN_LIGHT
Definition idunn_theme.h:28
@ IDUNN_DARK
Definition idunn_theme.h:29
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.
Definition theme.c:283
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.
Definition theme.c:222
const char * idunn_color_name(idunn_color_t which)
the name of a colour token in the theme file ("muted-foreground"), or NULL.
Definition theme.c:263
int32_t idunn_radius_sm(const idunn_theme_t *theme)
check boxes, small items in menus: half the radius
Definition theme.c:273
void idunn_theme_load(idunn_theme_t *theme)
read the user's theme (conf_open("theme")).
Definition theme.c:256
int32_t idunn_radius_lg(const idunn_theme_t *theme)
cards, dialogs, popovers, windows: the radius + 4
Definition theme.c:278
void idunn_theme_default(idunn_theme_t *theme)
the default theme: dark, rose, 13 px text, 6 px radius.
Definition theme.c:200
idunn_color_t
Definition idunn_theme.h:33
@ IDUNN_COLOR_ACCENT
Definition idunn_theme.h:50
@ IDUNN_COLOR_COUNT
Definition idunn_theme.h:59
@ IDUNN_COLOR_DESTRUCTIVE
Definition idunn_theme.h:53
@ IDUNN_COLOR_SECONDARY
Definition idunn_theme.h:47
@ IDUNN_COLOR_CARD_FOREGROUND
Definition idunn_theme.h:39
@ IDUNN_COLOR_TITLE_BOTTOM
Definition idunn_theme.h:57
@ IDUNN_COLOR_PRIMARY
Definition idunn_theme.h:45
@ IDUNN_COLOR_ACCENT_FOREGROUND
Definition idunn_theme.h:51
@ IDUNN_COLOR_RING
Definition idunn_theme.h:54
@ IDUNN_COLOR_INPUT
Definition idunn_theme.h:43
@ IDUNN_COLOR_SECONDARY_FOREGROUND
Definition idunn_theme.h:48
@ IDUNN_COLOR_HOVER
Definition idunn_theme.h:49
@ IDUNN_COLOR_TOP_LIGHT
Definition idunn_theme.h:58
@ IDUNN_COLOR_FIELD
Definition idunn_theme.h:44
@ IDUNN_COLOR_SIDEBAR
Definition idunn_theme.h:37
@ IDUNN_COLOR_MUTED
Definition idunn_theme.h:40
@ IDUNN_COLOR_PRIMARY_FOREGROUND
Definition idunn_theme.h:46
@ IDUNN_COLOR_TITLE_TOP
Definition idunn_theme.h:56
@ IDUNN_COLOR_BACKGROUND
Definition idunn_theme.h:34
@ IDUNN_COLOR_OVERLAY
Definition idunn_theme.h:55
@ IDUNN_COLOR_FOREGROUND
Definition idunn_theme.h:35
@ IDUNN_COLOR_CARD
Definition idunn_theme.h:38
@ IDUNN_COLOR_SELECTION
Definition idunn_theme.h:52
@ IDUNN_COLOR_MUTED_FOREGROUND
Definition idunn_theme.h:41
@ IDUNN_COLOR_BORDER
Definition idunn_theme.h:42
@ IDUNN_COLOR_SURFACE
Definition idunn_theme.h:36
int32_t idunn_radius(const idunn_theme_t *theme)
buttons, inputs, list rows
Definition theme.c:268
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.
Definition theme.c:211
idunn_text_t
Definition idunn_theme.h:63
@ IDUNN_TEXT_SMALL
Definition idunn_theme.h:66
@ IDUNN_TEXT_CAPTION
Definition idunn_theme.h:71
@ IDUNN_TEXT_HEADING
Definition idunn_theme.h:68
@ IDUNN_TEXT_MONO
Definition idunn_theme.h:70
@ IDUNN_TEXT_BODY
Definition idunn_theme.h:64
@ IDUNN_TEXT_HERO
Definition idunn_theme.h:72
@ IDUNN_TEXT_COUNT
Definition idunn_theme.h:73
@ IDUNN_TEXT_DISPLAY
Definition idunn_theme.h:69
@ IDUNN_TEXT_LABEL
Definition idunn_theme.h:65
@ IDUNN_TEXT_TITLE
Definition idunn_theme.h:67
integer types of fixed width.
int int32_t
Definition stdint.h:14
a CSS box-shadow: "x y blur spread color", and "inset".
Definition gfx.h:202
Definition idunn_theme.h:77
int32_t weight
Definition idunn_theme.h:80
float tracking
Definition idunn_theme.h:81
bool mono
Definition idunn_theme.h:82
int32_t line_height
Definition idunn_theme.h:79
int32_t size
Definition idunn_theme.h:78
Definition idunn_theme.h:96
bool motion
Definition idunn_theme.h:103
idunn_mode_t mode
Definition idunn_theme.h:97
int32_t font_size
Definition idunn_theme.h:100
gfx_color_t colors[2][IDUNN_COLOR_COUNT]
Definition idunn_theme.h:98
bool scale_auto
Definition idunn_theme.h:102
int32_t radius
Definition idunn_theme.h:99
int32_t scale
Definition idunn_theme.h:101