fix(element/scrollable): support deriving Container size of scrollable
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 13s

This commit is contained in:
2025-03-04 21:54:07 +01:00
parent fc72cf4abb
commit 466e00c16c
4 changed files with 25 additions and 36 deletions

View File

@@ -59,7 +59,9 @@ pub fn main() !void {
.layout = .{
.gap = 1,
.padding = .vertical(2),
.direction = .vertical,
},
.size = .{ .y = 90 },
}, .{});
try box.append(try App.Container.init(allocator, .{
.rectangle = .{ .fill = .light_green },
@@ -72,10 +74,7 @@ pub fn main() !void {
}, .{}));
defer box.deinit();
var scrollable: App.Scrollable = .{
.container = box,
.min_size = .{ .x = 60 },
};
var scrollable: App.Scrollable = .{ .container = box };
var container = try App.Container.init(allocator, .{
.layout = .{
@@ -92,7 +91,7 @@ pub fn main() !void {
.color = .light_blue,
.sides = .all,
},
.size = .{ .x = 200 },
.size = .{ .x = 100 },
}, .{}));
try container.append(try App.Container.init(allocator, .{
.rectangle = .{ .fill = .blue },