mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
action: add ResizeRelative
This commit is contained in:
parent
e40159470b
commit
ea623daaee
4 changed files with 36 additions and 0 deletions
11
src/view.c
11
src/view.c
|
|
@ -203,6 +203,17 @@ view_move_resize(struct view *view, struct wlr_box geo)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_resize_relative(struct view *view, int left, int right, int top, int bottom)
|
||||
{
|
||||
struct wlr_box newgeo = view->pending;
|
||||
newgeo.x -= left;
|
||||
newgeo.width += left + right;
|
||||
newgeo.y -= top;
|
||||
newgeo.height += top + bottom;
|
||||
view_move_resize(view, newgeo);
|
||||
}
|
||||
|
||||
void
|
||||
view_adjust_size(struct view *view, int *w, int *h)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue