From 3a0e0b8bb6e7fd9bcf510167980d9715e3faeb7b Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Thu, 15 Feb 2024 20:39:09 +0000 Subject: Even more work :) --- layout.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'layout.c') diff --git a/layout.c b/layout.c index 3592829..17aa2ef 100644 --- a/layout.c +++ b/layout.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "guifs.h" @@ -19,9 +20,9 @@ layout(GuiElement *g, Rectangle r0) { GuiSpec spec = guispecs[g->type]; - Spacing *margin = getprop(g, Pmargin).spacing; - Spacing *border = getprop(g, Pborder).spacing; - Spacing *padding = getprop(g, Ppadding).spacing; + Spacing *margin = getprop(g, Pmargin, 1).spacing; + Spacing *border = getprop(g, Pborder, 1).spacing; + Spacing *padding = getprop(g, Ppadding, 1).spacing; /* Subtract margin to get the outer border rect */ Rectangle r1 = subspacing(r0, margin); @@ -49,7 +50,7 @@ layoutcontainer(GuiElement *g, Rectangle r) if(g->nchildren == 0) return; - int orientation = getprop(g, Porientation).orientation; + int orientation = getprop(g, Porientation, 1).orientation; int dx = 0; int dy = 0; -- cgit v1.2.3