mirror of
https://github.com/labwc/labwc.git
synced 2026-02-18 22:05:32 -05:00
view: use fixed default window width
Now it's not very reasonable to determine the default window width based on the titlebar geometry, as the titlebar can be shrunk to 1px. Let's use the fixed value of 100px for simplification.
This commit is contained in:
parent
6ed2617394
commit
164b17c279
4 changed files with 9 additions and 20 deletions
|
|
@ -221,7 +221,6 @@ snap_shrink_to_next_edge(struct view *view,
|
|||
|
||||
*geo = view->pending;
|
||||
enum lab_edge resize_edges;
|
||||
int min_width = view_get_min_width();
|
||||
|
||||
/*
|
||||
* First shrink the view along the relevant edge. The maximum shrink
|
||||
|
|
@ -230,12 +229,12 @@ snap_shrink_to_next_edge(struct view *view,
|
|||
*/
|
||||
switch (direction) {
|
||||
case LAB_EDGE_RIGHT:
|
||||
geo->width = MAX(geo->width / 2, min_width);
|
||||
geo->width = MAX(geo->width / 2, LAB_MIN_VIEW_WIDTH);
|
||||
geo->x = view->pending.x + view->pending.width - geo->width;
|
||||
resize_edges = LAB_EDGE_LEFT;
|
||||
break;
|
||||
case LAB_EDGE_LEFT:
|
||||
geo->width = MAX(geo->width / 2, min_width);
|
||||
geo->width = MAX(geo->width / 2, LAB_MIN_VIEW_WIDTH);
|
||||
resize_edges = LAB_EDGE_RIGHT;
|
||||
break;
|
||||
case LAB_EDGE_BOTTOM:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue