diff options
author | 2022-07-18 23:38:44 +0200 | |
---|---|---|
committer | 2022-07-18 23:38:44 +0200 | |
commit | cdd3802e6858c81985849aca9d2daf733828ba29 (patch) | |
tree | f6e46210caf1ee9409f11cd97cad97b642d63bb3 /native/src | |
parent | 7e5a5ae743785c153fc328c8aa4ed290298ecc62 (diff) | |
download | iced-cdd3802e6858c81985849aca9d2daf733828ba29.tar.gz iced-cdd3802e6858c81985849aca9d2daf733828ba29.tar.bz2 iced-cdd3802e6858c81985849aca9d2daf733828ba29.zip |
Fix `max_height` for `Scrollable`
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/widget/scrollable.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/native/src/widget/scrollable.rs b/native/src/widget/scrollable.rs index 1b255860..77ed2066 100644 --- a/native/src/widget/scrollable.rs +++ b/native/src/widget/scrollable.rs @@ -162,9 +162,10 @@ pub fn layout<Renderer>( limits: &layout::Limits, width: Length, height: Length, + max_height: u32, layout_content: impl FnOnce(&Renderer, &layout::Limits) -> layout::Node, ) -> layout::Node { - let limits = limits.width(width).height(height); + let limits = limits.max_height(max_height).width(width).height(height); let child_limits = layout::Limits::new( Size::new(limits.min().width, 0.0), @@ -648,6 +649,7 @@ where limits, Widget::<Message, Renderer>::width(self), self.height, + self.max_height, |renderer, limits| self.content.layout(renderer, limits), ) } |