summaryrefslogtreecommitdiffstats
path: root/widget/src/lazy/component.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/lazy/component.rs')
-rw-r--r--widget/src/lazy/component.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/widget/src/lazy/component.rs b/widget/src/lazy/component.rs
index ad0c3823..3684e0c9 100644
--- a/widget/src/lazy/component.rs
+++ b/widget/src/lazy/component.rs
@@ -244,12 +244,15 @@ where
self.rebuild_element_if_necessary();
}
- fn width(&self) -> Length {
- self.with_element(|element| element.as_widget().width())
+ fn size(&self) -> Size<Length> {
+ self.with_element(|element| element.as_widget().size())
}
- fn height(&self) -> Length {
- self.with_element(|element| element.as_widget().height())
+ fn size_hint(&self) -> Size<Length> {
+ Size {
+ width: Length::Shrink,
+ height: Length::Shrink,
+ }
}
fn layout(