fix: reset theme->title_height

This commit is contained in:
Moises Lima 2023-10-01 14:45:59 -03:00
parent 3e5b988d38
commit 5da6aac1d5
119 changed files with 8 additions and 2 deletions

View file

@ -213,6 +213,7 @@ theme_builtin(struct theme *theme)
{
theme->border_width = 1;
theme->padding_height = 3;
theme->title_height = 0;
theme->menu_overlap_x = 0;
theme->menu_overlap_y = 0;
@ -400,6 +401,10 @@ entry(struct theme *theme, const char *key, const char *value)
theme->menu_max_width = atoi(value);
}
if (match_glob(key, "title.height")) {
theme->title_height = atoi(value);
}
if (match_glob(key, "menu.items.bg.color")) {
parse_hexstr(value, theme->menu_items_bg_color);
}
@ -750,8 +755,9 @@ create_corners(struct theme *theme)
static void
post_processing(struct theme *theme)
{
theme->title_height = font_height(&rc.font_activewindow)
+ 2 * theme->padding_height;
int h = font_height(&rc.font_activewindow) + 2 * theme->padding_height;
theme->title_height = MAX(theme->title_height, h);
theme->osd_window_switcher_item_height = font_height(&rc.font_osd)
+ 2 * theme->osd_window_switcher_item_padding_y
+ 2 * theme->osd_window_switcher_item_active_border_width;