diff options
author | 2024-03-07 20:11:32 +0100 | |
---|---|---|
committer | 2024-03-07 20:11:32 +0100 | |
commit | 833538ee7f3a60a839304762dfc29b0881d19094 (patch) | |
tree | 7afbc69659c95f9cbec58c938f1939cca3290b04 /widget/src/tooltip.rs | |
parent | 44f002f64a9d53040f09affe69bd92675e302e16 (diff) | |
download | iced-833538ee7f3a60a839304762dfc29b0881d19094.tar.gz iced-833538ee7f3a60a839304762dfc29b0881d19094.tar.bz2 iced-833538ee7f3a60a839304762dfc29b0881d19094.zip |
Leverage `DefaultStyle` traits instead of `Default`
Diffstat (limited to 'widget/src/tooltip.rs')
-rw-r--r-- | widget/src/tooltip.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/tooltip.rs b/widget/src/tooltip.rs index 4e026e8f..8c8ee983 100644 --- a/widget/src/tooltip.rs +++ b/widget/src/tooltip.rs @@ -47,7 +47,7 @@ where position: Position, ) -> Self where - container::Style<Theme>: Default, + Theme: container::DefaultStyle, { Tooltip { content: content.into(), @@ -56,7 +56,7 @@ where gap: 0.0, padding: Self::DEFAULT_PADDING, snap_within_viewport: true, - style: container::Style::default(), + style: Theme::default_style(), } } @@ -424,7 +424,7 @@ where layout: Layout<'_>, cursor_position: mouse::Cursor, ) { - let style = self.style.resolve(theme, container::Status::Idle); + let style = (self.style)(theme, container::Status::Idle); container::draw_background(renderer, &style, layout.bounds()); |