Remove now redundant Overlay::is_over
The `mouse_interaction` method can be properly used now to encode hover status with the `None` and `Idle` variants.
This commit is contained in:
parent
a01beefa84
commit
9e934fe2a7
15 changed files with 92 additions and 256 deletions
|
|
@ -6,8 +6,8 @@ use crate::core::renderer;
|
|||
use crate::core::widget::Operation;
|
||||
use crate::core::widget::tree::{self, Tree};
|
||||
use crate::core::{
|
||||
Background, Clipboard, Color, Element, Event, Layout, Length, Point,
|
||||
Rectangle, Shell, Size, Vector, Widget,
|
||||
Background, Clipboard, Color, Element, Event, Layout, Length, Rectangle,
|
||||
Shell, Size, Vector, Widget,
|
||||
};
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
|
@ -248,25 +248,11 @@ where
|
|||
&self,
|
||||
layout: Layout<'_>,
|
||||
cursor: mouse::Cursor,
|
||||
viewport: &Rectangle,
|
||||
renderer: &Renderer,
|
||||
) -> mouse::Interaction {
|
||||
self.content
|
||||
.as_overlay()
|
||||
.mouse_interaction(layout, cursor, viewport, renderer)
|
||||
}
|
||||
|
||||
fn is_over(
|
||||
&self,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
cursor_position: Point,
|
||||
) -> bool {
|
||||
self.content.as_overlay().is_over(
|
||||
layout,
|
||||
renderer,
|
||||
cursor_position,
|
||||
)
|
||||
.mouse_interaction(layout, cursor, renderer)
|
||||
}
|
||||
|
||||
fn overlay<'b>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue