From 31d3a53e46331c4833c0c10d43e8240566215420 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Sat, 10 Apr 2021 18:40:43 +0100 Subject: [PATCH] theme: add window.active.border.color This replaces window.active.handle.bg.color which will no longer be supported. --- docs/labwc-theme.5.scd | 6 +++--- include/theme.h | 4 ++-- src/ssd.c | 6 +++--- src/theme.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/labwc-theme.5.scd b/docs/labwc-theme.5.scd index e16a93b0..c22d5292 100644 --- a/docs/labwc-theme.5.scd +++ b/docs/labwc-theme.5.scd @@ -33,12 +33,12 @@ A theme consists of a themerc file and optionally some xbm icons. Line width (integer) of border border drawn around window frames. Default is 1. +*window.active.border.color* + Border color of active window + *window.active.title.bg.color* Background for the focussed window's titlebar -*window.active.handle.bg.color* - Background for the focussed window's handle. - *window.inactive.title.bg.color* Background for non-focussed windows' titlebars diff --git a/include/theme.h b/include/theme.h index f2321db9..34b750e7 100644 --- a/include/theme.h +++ b/include/theme.h @@ -14,10 +14,10 @@ struct theme { int border_width; float window_active_title_bg_color[4]; - float window_active_handle_bg_color[4]; - float window_inactive_title_bg_color[4]; + float window_active_border_color[4]; + float window_active_button_unpressed_image_color[4]; float window_inactive_button_unpressed_image_color[4]; diff --git a/src/ssd.c b/src/ssd.c index 5dc8f836..bcbdbf7b 100644 --- a/src/ssd.c +++ b/src/ssd.c @@ -256,8 +256,8 @@ ssd_create(struct view *view) for (int i = 0; i < 4; i++) { part = add_part(view, border[i]); part->box = ssd_box(view, border[i]); - part->color.active = theme->window_active_handle_bg_color; - part->color.inactive = theme->window_active_handle_bg_color; + part->color.active = theme->window_active_border_color; + part->color.inactive = theme->window_active_border_color; } /* titlebar */ @@ -275,7 +275,7 @@ ssd_create(struct view *view) .radius = rc.corner_radius, .line_width = theme->border_width, .fill_color = theme->window_active_title_bg_color, - .border_color = theme->window_active_handle_bg_color, + .border_color = theme->window_active_border_color, .corner = LAB_CORNER_TOP_LEFT, }; part->texture.active = rounded_rect(renderer, &ctx); diff --git a/src/theme.c b/src/theme.c index 49621d7a..409ea482 100644 --- a/src/theme.c +++ b/src/theme.c @@ -65,7 +65,7 @@ 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("#3c7cb7", theme->window_active_border_color); parse_hexstr("#efece6", theme->window_inactive_title_bg_color); parse_hexstr("#ffffff", theme->window_active_button_unpressed_image_color); parse_hexstr("#000000", theme->window_inactive_button_unpressed_image_color); @@ -91,7 +91,7 @@ static void entry(struct theme *theme, const char *key, const char *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); + parse_hexstr(value, theme->window_active_border_color); } else if (match(key, "window.inactive.title.bg.color")) { parse_hexstr(value, theme->window_inactive_title_bg_color); } else if (match(key, "window.active.button.unpressed.image.color")) { -- 2.52.0