diff options
author | 2024-07-21 12:45:05 +0200 | |
---|---|---|
committer | 2024-07-21 12:45:05 +0200 | |
commit | 9bfaf2840cffe35d689bd115a308d21961ab082a (patch) | |
tree | c9a7b4fc04607c3315dabe3ad2527251b0a3dff8 /widget/src/helpers.rs | |
parent | 4b44079f34aa9e01977a7974e5f49ae79ff6cd90 (diff) | |
download | iced-9bfaf2840cffe35d689bd115a308d21961ab082a.tar.gz iced-9bfaf2840cffe35d689bd115a308d21961ab082a.tar.bz2 iced-9bfaf2840cffe35d689bd115a308d21961ab082a.zip |
Add `Link` support to `rich_text` widget
Diffstat (limited to 'widget/src/helpers.rs')
-rw-r--r-- | widget/src/helpers.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/widget/src/helpers.rs b/widget/src/helpers.rs index 6def61d5..5b1cb5bc 100644 --- a/widget/src/helpers.rs +++ b/widget/src/helpers.rs @@ -683,10 +683,11 @@ where /// Creates a new [`Rich`] text widget with the provided spans. /// /// [`Rich`]: text::Rich -pub fn rich_text<'a, Theme, Renderer>( - spans: impl Into<Cow<'a, [text::Span<'a, Renderer::Font>]>>, -) -> text::Rich<'a, Theme, Renderer> +pub fn rich_text<'a, Message, Link, Theme, Renderer>( + spans: impl Into<Cow<'a, [text::Span<'a, Link, Renderer::Font>]>>, +) -> text::Rich<'a, Message, Link, Theme, Renderer> where + Link: Clone, Theme: text::Catalog + 'a, Renderer: core::text::Renderer, { |