diff options
Diffstat (limited to '')
-rw-r--r-- | widget/src/lazy.rs | 7 | ||||
-rw-r--r-- | widget/src/lazy/component.rs | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/widget/src/lazy.rs b/widget/src/lazy.rs index 167a055d..4f6513db 100644 --- a/widget/src/lazy.rs +++ b/widget/src/lazy.rs @@ -150,6 +150,13 @@ where self.with_element(|element| element.as_widget().height()) } + fn size_hint(&self) -> Size<Length> { + Size { + width: Length::Shrink, + height: Length::Shrink, + } + } + fn layout( &self, tree: &mut Tree, diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs index ad0c3823..0aff7485 100644 --- a/widget/src/lazy/component.rs +++ b/widget/src/lazy/component.rs @@ -252,6 +252,13 @@ where self.with_element(|element| element.as_widget().height()) } + fn size_hint(&self) -> Size<Length> { + Size { + width: Length::Shrink, + height: Length::Shrink, + } + } + fn layout( &self, tree: &mut Tree, |