add(layout/padding): layout configuration for padding

With minor code layout fixes
This commit is contained in:
2025-02-08 13:11:27 +01:00
parent d326deac97
commit 29ae75adf5
2 changed files with 33 additions and 13 deletions

View File

@@ -26,14 +26,14 @@ pub fn main() !void {
var container = try App.Container.init(allocator, .{
.border = .{
.color = .blue,
.sides = .{
.left = false,
.bottom = false,
},
.corners = .rounded,
.separator = .{ .enabled = false },
},
.layout = .{ .gap = 3, .direction = .horizontal },
.layout = .{
.gap = 3,
.padding = .all(2),
.direction = .horizontal,
},
});
try container.append(try App.Container.init(allocator, .{
.border = .{ .color = .light_blue, .corners = .squared },
@@ -42,6 +42,10 @@ pub fn main() !void {
try container.append(try App.Container.init(allocator, .{
.border = .{ .color = .light_blue, .corners = .squared },
}));
try container.append(try App.Container.init(allocator, .{
.border = .{ .color = .light_blue, .corners = .squared },
.rectangle = .{ .fill = .blue },
}));
defer container.deinit();
// NOTE: should the min-size here be required?