mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
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:
parent
8850368ab9
commit
824b0fa4e3
13 changed files with 105 additions and 39 deletions
|
|
@ -606,15 +606,15 @@ handle_map_request(struct wl_listener *listener, void *data)
|
|||
static void
|
||||
check_natural_geometry(struct view *view)
|
||||
{
|
||||
int min_width = view_get_min_width();
|
||||
|
||||
/*
|
||||
* Some applications (example: Thonny) don't set a reasonable
|
||||
* un-maximized size when started maximized. Try to detect this
|
||||
* and set a fallback size.
|
||||
*/
|
||||
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.width < min_width
|
||||
|| view->natural_geometry.height < LAB_MIN_VIEW_HEIGHT)) {
|
||||
view_set_fallback_natural_geometry(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue