mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
view: add 'struct border margin'
Simplify various view interfaces as a result
This commit is contained in:
parent
5a77c84fc8
commit
090e78b85a
9 changed files with 91 additions and 101 deletions
12
src/output.c
12
src/output.c
|
|
@ -53,14 +53,10 @@ static void render_cycle_box(struct output *output)
|
|||
}
|
||||
return;
|
||||
render_it:
|
||||
if ((view->type == LAB_XWAYLAND_VIEW) || !rc.client_side_decorations) {
|
||||
box = deco_max_extents(view);
|
||||
} else {
|
||||
box.x = view->x;
|
||||
box.y = view->y;
|
||||
box.width = view->w;
|
||||
box.height = view->h;
|
||||
}
|
||||
box.x = view->x - view->margin.left;
|
||||
box.y = view->y - view->margin.top;
|
||||
box.width = view->w + view->margin.left + view->margin.right;
|
||||
box.height = view->h + view->margin.top + view->margin.bottom;
|
||||
struct draw_data dd = {
|
||||
.renderer = view->server->renderer,
|
||||
.transform_matrix = output->wlr_output->transform_matrix,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue