aboutsummaryrefslogtreecommitdiff
path: root/src/saffron_layout.c
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-04-21 18:11:23 +1200
committerArslaan Pathan <[email protected]>2026-04-21 18:11:23 +1200
commitcce512b7252ff7fd3f1329f224407fb772c9b4aa (patch)
treecc58f0cd705338c49c7f9829f7eb6c13befa994c /src/saffron_layout.c
parent12fb8e70c79fb262a06431bfbd0e4ce97380d2a8 (diff)
downloadsaffron-cce512b7252ff7fd3f1329f224407fb772c9b4aa.tar.xz
saffron-cce512b7252ff7fd3f1329f224407fb772c9b4aa.zip
A bunch of more layout work
Diffstat (limited to 'src/saffron_layout.c')
-rw-r--r--src/saffron_layout.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/saffron_layout.c b/src/saffron_layout.c
index cc91246..c714bfa 100644
--- a/src/saffron_layout.c
+++ b/src/saffron_layout.c
@@ -23,4 +23,19 @@ SaffronBox* saffron_box_new(SaffronOrientation orientation, SaffronHorizontalAli
return box;
}
+void saffron_box_layout(SaffronBox* box) {
+ if (!box || ((SaffronWidget*)box)->child_count == 0) return;
+ int content_x = ((SaffronWidget*)box)->x + box->margin;
+ int content_y = ((SaffronWidget*)box)->y + box->margin;
+ int content_w = ((SaffronWidget*)box)->w - (box->margin * 2);
+ int content_h = ((SaffronWidget*)box)->h - (box->margin * 2);
+
+ int inner_x = content_x + box->padding;
+ int inner_y = content_y + box->padding;
+ int inner_w = content_w - (box->padding * 2);
+ int inner_h = content_h - (box->padding * 2);
+
+ /* TODO actually make it layout */
+ return;
+}