theme: support border.width

This commit is contained in:
Johan Malm 2021-03-27 21:09:45 +00:00
parent fdfb12b2ce
commit b3a73a9fdc
4 changed files with 29 additions and 20 deletions

View file

@ -63,6 +63,7 @@ parse_hexstr(const char *hex, float *rgba)
*/
void theme_builtin(struct theme *theme)
{
theme->border_width = 1;
parse_hexstr("#589bda", theme->window_active_title_bg_color);
parse_hexstr("#3c7cb7", theme->window_active_handle_bg_color);
parse_hexstr("#efece6", theme->window_inactive_title_bg_color);
@ -85,7 +86,9 @@ static void entry(struct theme *theme, const char *key, const char *value)
if (!key || !value) {
return;
}
if (match(key, "window.active.title.bg.color")) {
if (match(key, "border.width")) {
theme->border_width = atoi(value);
} else if (match(key, "window.active.title.bg.color")) {
parse_hexstr(value, theme->window_active_title_bg_color);
} else if (match(key, "window.active.handle.bg.color")) {
parse_hexstr(value, theme->window_active_handle_bg_color);