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

@ -621,8 +621,9 @@ check_natural_geometry(struct view *view)
* un-maximized size when started maximized. Try to detect this
* and set a fallback size.
*/
int min_view_width = rc.theme->window_button_width * SSD_BUTTON_COUNT;
if (!view_is_floating(view)
&& (view->natural_geometry.width < LAB_MIN_VIEW_WIDTH
&& (view->natural_geometry.width < min_view_width
|| view->natural_geometry.height < LAB_MIN_VIEW_HEIGHT)) {
view_set_fallback_natural_geometry(view);
}