mirror of
https://github.com/labwc/labwc.git
synced 2026-02-12 04:27:57 -05:00
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:
parent
46ec513630
commit
e4afa10fe4
14 changed files with 59 additions and 33 deletions
|
|
@ -220,6 +220,7 @@ snap_shrink_to_next_edge(struct view *view,
|
|||
|
||||
*geo = view->pending;
|
||||
uint32_t resize_edges;
|
||||
int min_view_width = rc.theme->window_button_width * SSD_BUTTON_COUNT;
|
||||
|
||||
/*
|
||||
* First shrink the view along the relevant edge. The maximum shrink
|
||||
|
|
@ -228,12 +229,12 @@ snap_shrink_to_next_edge(struct view *view,
|
|||
*/
|
||||
switch (direction) {
|
||||
case VIEW_EDGE_RIGHT:
|
||||
geo->width = MAX(geo->width / 2, LAB_MIN_VIEW_WIDTH);
|
||||
geo->width = MAX(geo->width / 2, min_view_width);
|
||||
geo->x = view->pending.x + view->pending.width - geo->width;
|
||||
resize_edges = WLR_EDGE_LEFT;
|
||||
break;
|
||||
case VIEW_EDGE_LEFT:
|
||||
geo->width = MAX(geo->width / 2, LAB_MIN_VIEW_WIDTH);
|
||||
geo->width = MAX(geo->width / 2, min_view_width);
|
||||
resize_edges = WLR_EDGE_RIGHT;
|
||||
break;
|
||||
case VIEW_EDGE_DOWN:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue