theme: allow to set window button size (#1965)

This commit introduces new option "window.button.width". Despite the name
it currently affects both width and height.
This commit is contained in:
Consus 2024-07-20 11:33:57 +03:00 committed by GitHub
parent 46ec513630
commit e4afa10fe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 59 additions and 33 deletions

View file

@ -611,6 +611,7 @@ view_adjust_size(struct view *view, int *w, int *h)
{
assert(view);
struct view_size_hints hints = view_get_size_hints(view);
int min_view_width = rc.theme->window_button_width * SSD_BUTTON_COUNT;
/*
* "If a base size is not provided, the minimum size is to be
@ -633,7 +634,7 @@ view_adjust_size(struct view *view, int *w, int *h)
* This is currently always the case for xdg-shell views.
*/
if (hints.min_width < 1) {
hints.min_width = LAB_MIN_VIEW_WIDTH;
hints.min_width = min_view_width;
}
if (hints.min_height < 1) {
hints.min_height = LAB_MIN_VIEW_HEIGHT;