From 66939b22b0ee7e1dc0e5ef31594fae5810ffa7b2 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 12 Apr 2023 23:40:36 +0200 Subject: Remove `max_width` and `max_height` calls in `scrollable::layout` --- native/src/widget/scrollable.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'native/src/widget') diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 45cd2a0e..8e8138cd 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -405,15 +405,7 @@ pub fn layout( 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), -- cgit