fix(element/scrollable): reduce the number of minSize calls and correctly resize scrollable Container
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m26s

This commit is contained in:
2025-11-05 18:33:16 +01:00
parent e53bb7880b
commit 8ebab702ac
2 changed files with 14 additions and 15 deletions

View File

@@ -891,7 +891,7 @@ pub fn Container(Model: type, Event: type) type {
const fit_size = this.fit_resize();
// if (fit_size.y > size.y or fit_size.x > size.x) @panic("error: cannot render in available space");
switch (this.properties.size.grow) {
.both => this.size = Point.max(size, fit_size),
.both => this.size = .max(size, fit_size),
.fixed => {},
.horizontal => this.size = .{
.x = @max(size.x, fit_size.x),