theme: add option osd.window-switcher.padding

Fixes: issue #969
This commit is contained in:
Johan Malm 2023-06-29 21:29:43 +01:00 committed by Johan Malm
parent fe8cdd7f8b
commit 55bf79c3fe
5 changed files with 24 additions and 6 deletions

View file

@ -141,6 +141,7 @@ theme_builtin(struct theme *theme)
parse_hexstr("#888888", theme->menu_separator_color);
theme->osd_window_switcher_width = 600;
theme->osd_window_switcher_padding = INT_MIN;
theme->osd_window_switcher_item_padding_x = 10;
theme->osd_window_switcher_item_padding_y = 6;
@ -311,6 +312,9 @@ entry(struct theme *theme, const char *key, const char *value)
if (match_glob(key, "osd.window-switcher.width")) {
theme->osd_window_switcher_width = atoi(value);
}
if (match_glob(key, "osd.window-switcher.padding")) {
theme->osd_window_switcher_padding = atoi(value);
}
if (match_glob(key, "osd.window-switcher.item.padding.x")) {
theme->osd_window_switcher_item_padding_x = atoi(value);
}
@ -554,6 +558,9 @@ post_processing(struct theme *theme)
if (theme->osd_border_width == INT_MIN) {
theme->osd_border_width = theme->border_width;
}
if (theme->osd_window_switcher_padding == INT_MIN) {
theme->osd_window_switcher_padding = theme->osd_border_width;
}
if (theme->osd_label_text_color[0] == FLT_MIN) {
memcpy(theme->osd_label_text_color,
theme->window_active_label_text_color,