diff options
| author | 2025-02-01 01:07:03 +0100 | |
|---|---|---|
| committer | 2025-02-01 01:07:03 +0100 | |
| commit | c2155b82b35200585991a09945fb93903a61fccf (patch) | |
| tree | 83e6a7a342d7112200a017274ec4770ce492622b /widget | |
| parent | 7336a18443ea88ef04ea842a07ba02e89400bbd2 (diff) | |
| download | iced-c2155b82b35200585991a09945fb93903a61fccf.tar.gz iced-c2155b82b35200585991a09945fb93903a61fccf.tar.bz2 iced-c2155b82b35200585991a09945fb93903a61fccf.zip | |
Cull out of bounds `rich_text` during `draw`
Diffstat (limited to 'widget')
| -rw-r--r-- | widget/src/text/rich.rs | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/widget/src/text/rich.rs b/widget/src/text/rich.rs index a40f2b57..69a3393a 100644 --- a/widget/src/text/rich.rs +++ b/widget/src/text/rich.rs @@ -239,6 +239,10 @@ where          cursor: mouse::Cursor,          viewport: &Rectangle,      ) { +        if !layout.bounds().intersects(viewport) { +            return; +        } +          let state = tree              .state              .downcast_ref::<State<Link, Renderer::Paragraph>>(); | 
