add(sizing): grow configuration
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m14s

Currently the 'grid' and 'mixed' examples are not working yet.
This commit is contained in:
2025-03-05 22:53:28 +01:00
parent 9ec335cad8
commit e3551fa624
6 changed files with 121 additions and 52 deletions

View File

@@ -61,7 +61,9 @@ pub fn main() !void {
.padding = .vertical(2),
.direction = .vertical,
},
.size = .{ .y = 90 },
.size = .{
.dim = .{ .y = 90 },
},
}, .{});
try box.append(try App.Container.init(allocator, .{
.rectangle = .{ .fill = .light_green },
@@ -91,11 +93,15 @@ pub fn main() !void {
.color = .light_blue,
.sides = .all,
},
.size = .{ .x = 100 },
.size = .{
.dim = .{ .x = 100 },
},
}, .{}));
try container.append(try App.Container.init(allocator, .{
.rectangle = .{ .fill = .blue },
.size = .{ .x = 30 },
.size = .{
.dim = .{ .x = 30 },
},
}, .{}));
defer container.deinit(); // also de-initializes the children