From 4738e26d15d291f60c06af1a7587ffaee8453d97 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 24 Sep 2021 21:26:31 +0100 Subject: [PATCH] theme: handle border.color for backward compatibility --- docs/labwc-theme.5.scd | 4 ++++ src/theme.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/labwc-theme.5.scd b/docs/labwc-theme.5.scd index aa832f9e..8e71d8e9 100644 --- a/docs/labwc-theme.5.scd +++ b/docs/labwc-theme.5.scd @@ -70,6 +70,10 @@ elements are not listed here, but are supported. *menu.items.active.text.color* Text color of active menu item +*border.color* + Set all border colors. This is obsolete, but supported for backward + compatibility as some themes still contain it. + # BUTTONS The images used for the titlebar buttons are 1-bit xbm (X Bitmaps). These are diff --git a/src/theme.c b/src/theme.c index 62c813fa..88a62d48 100644 --- a/src/theme.c +++ b/src/theme.c @@ -137,6 +137,11 @@ entry(struct theme *theme, const char *key, const char *value) if (match(key, "window.inactive.border.color")) { parse_hexstr(value, theme->window_inactive_border_color); } + /* border.color is obsolete, but handled for backward compatibility */ + if (match(key, "border.color")) { + parse_hexstr(value, theme->window_active_border_color); + parse_hexstr(value, theme->window_inactive_border_color); + } if (match(key, "window.active.title.bg.color")) { parse_hexstr(value, theme->window_active_title_bg_color);