diff options
Diffstat (limited to 'widget/src/tooltip.rs')
-rw-r--r-- | widget/src/tooltip.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/widget/src/tooltip.rs b/widget/src/tooltip.rs index b888980a..d09a9255 100644 --- a/widget/src/tooltip.rs +++ b/widget/src/tooltip.rs @@ -131,12 +131,8 @@ where widget::tree::Tag::of::<State>() } - fn width(&self) -> Length { - self.content.as_widget().width() - } - - fn height(&self) -> Length { - self.content.as_widget().height() + fn size(&self) -> Size<Length> { + self.content.as_widget().size() } fn layout( @@ -353,7 +349,7 @@ where .then(|| viewport.size()) .unwrap_or(Size::INFINITY), ) - .pad(Padding::new(self.padding)), + .shrink(Padding::new(self.padding)), ); let text_bounds = text_layout.bounds(); |