Merge pull request #2088 from xi/titlelayout

theme: implement titleLayout
This commit is contained in:
Johan Malm 2024-08-21 19:20:34 +01:00 committed by GitHub
commit 228a74ca48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 261 additions and 179 deletions

View file

@ -611,7 +611,8 @@ 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;
int min_view_width = rc.theme->window_button_width * (
wl_list_length(&rc.title_buttons_left) + wl_list_length(&rc.title_buttons_right));
if (!view_is_floating(view)
&& (view->natural_geometry.width < min_view_width
|| view->natural_geometry.height < LAB_MIN_VIEW_HEIGHT)) {