mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -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
16
src/deco.c
16
src/deco.c
|
|
@ -10,17 +10,17 @@
|
|||
#include "common/bug-on.h"
|
||||
#include "common/log.h"
|
||||
|
||||
#define BORDER_WIDTH (1)
|
||||
#define BORDER_WIDTH (2)
|
||||
|
||||
struct wlr_box deco_max_extents(struct view *view)
|
||||
struct border deco_max_extents(struct view *view)
|
||||
{
|
||||
struct wlr_box box = {
|
||||
.x = view->x - BORDER_WIDTH,
|
||||
.y = view->y - rc.title_height - BORDER_WIDTH,
|
||||
.width = view->w + 2 * BORDER_WIDTH,
|
||||
.height = view->h + rc.title_height + 2 * BORDER_WIDTH,
|
||||
struct border border = {
|
||||
.top = rc.title_height + BORDER_WIDTH,
|
||||
.bottom = BORDER_WIDTH,
|
||||
.left = BORDER_WIDTH,
|
||||
.right = BORDER_WIDTH,
|
||||
};
|
||||
return box;
|
||||
return border;
|
||||
}
|
||||
|
||||
struct wlr_box deco_box(struct view *view, enum deco_part deco_part)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue