Skip to content

Commit 8fe8510

Browse files
committed
fix: lazy widgets overlay is_over
1 parent 92ba26b commit 8fe8510

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

lazy/src/component.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,4 +563,11 @@ where
563563

564564
event_status
565565
}
566+
567+
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
568+
self.with_overlay_maybe(|overlay| {
569+
overlay.is_over(layout, cursor_position)
570+
})
571+
.unwrap_or_default()
572+
}
566573
}

lazy/src/lazy.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,13 @@ where
372372
})
373373
.unwrap_or(iced_native::event::Status::Ignored)
374374
}
375+
376+
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
377+
self.with_overlay_maybe(|overlay| {
378+
overlay.is_over(layout, cursor_position)
379+
})
380+
.unwrap_or_default()
381+
}
375382
}
376383

377384
impl<'a, Message, Renderer, Dependency, View>

lazy/src/responsive.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,4 +415,11 @@ where
415415
})
416416
.unwrap_or(iced_native::event::Status::Ignored)
417417
}
418+
419+
fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
420+
self.with_overlay_maybe(|overlay| {
421+
overlay.is_over(layout, cursor_position)
422+
})
423+
.unwrap_or_default()
424+
}
418425
}

0 commit comments

Comments
 (0)