theme: add button padding and spacing (#2127)

While at it, separate corner width from button
width. Both are independed and having them
separately improves readability.
This commit is contained in:
Jens Peters 2024-09-09 17:43:38 +02:00 committed by Johan Malm
parent 8850368ab9
commit 824b0fa4e3
13 changed files with 105 additions and 39 deletions

View file

@ -76,8 +76,9 @@ ssd_extents_update(struct ssd *ssd)
int full_height = height + theme->border_width * 2 + ssd->titlebar.height;
int full_width = width + 2 * theme->border_width;
int extended_area = SSD_EXTENDED_AREA;
int corner_width = ssd_get_corner_width();
int corner_size = extended_area + theme->border_width +
MIN(theme->window_button_width, width) / 2;
MIN(corner_width, width) / 2;
int side_width = full_width + extended_area * 2 - corner_size * 2;
int side_height = full_height + extended_area * 2 - corner_size * 2;