Remove max_width and max_height calls in scrollable::layout

This commit is contained in:
Héctor Ramón Jiménez 2023-04-12 23:40:36 +02:00
parent 046f3596ca
commit 66939b22b0
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -405,15 +405,7 @@ pub fn layout<Renderer>(
horizontal_enabled: bool,
layout_content: impl FnOnce(&Renderer, &layout::Limits) -> layout::Node,
) -> layout::Node {
let limits = limits
.max_height(f32::INFINITY)
.max_width(if horizontal_enabled {
f32::INFINITY
} else {
limits.max().width
})
.width(width)
.height(height);
let limits = limits.width(width).height(height);
let child_limits = layout::Limits::new(
Size::new(limits.min().width, 0.0),