summaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2024-02-15 20:39:09 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2024-02-15 20:39:09 +0000
commit3a0e0b8bb6e7fd9bcf510167980d9715e3faeb7b (patch)
tree17f5aaaddf15ea6c8bbb0043e89f87be0ce7021e /layout.c
parent0ad54d136ef33d61172658e97b538f7cd6a91c26 (diff)
Even more work :)
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/layout.c b/layout.c
index 3592829..17aa2ef 100644
--- a/layout.c
+++ b/layout.c
@@ -1,6 +1,7 @@
#include <u.h>
#include <libc.h>
#include <draw.h>
+#include <thread.h>
#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;