╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────╮ │431 │ │432 const child_grid = self.child.getGrid() orelse return; │ │433 │ │434 - const width = constraint.max_size.width orelse child_grid.size.width; │ │435 - const height = constraint.max_size.height orelse child_grid.size.height; │ │434 + // prefer max when given; otherwise grow to max(min, child) so that │ │435 + // when only a min is set (e.g. the wasm path passes viewport rows │ │436 + // as min_height with no max), we can still vertically center while │ │437 + // letting taller content extend past the min. │ │438 + const width = if (constraint.max_size.width) |w| w │ │439 + else if (constraint.min_size.width) |min_w| @max(min_w, child_grid.size.width) │ │440 + else child_grid.size.width; │ │441 + const height = if (constraint.max_size.height) |h| h │ │442 + else if (constraint.min_size.height) |min_h| @max(min_h, child_grid.size.height)│ │443 + else child_grid.size.height; │ │444 if (width == 0 or height == 0) return; │ │445 │ │446 const offset_x: usize = if (self.direction == .horiz or self.direction == .both) │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯