Implement Widget::mouse_interaction for Container
This commit is contained in:
parent
be97a5d502
commit
5130e98dc8
1 changed files with 14 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ use std::hash::Hash;
|
|||
use crate::alignment::{self, Alignment};
|
||||
use crate::event::{self, Event};
|
||||
use crate::layout;
|
||||
use crate::mouse;
|
||||
use crate::overlay;
|
||||
use crate::renderer;
|
||||
use crate::{
|
||||
|
|
@ -175,6 +176,19 @@ where
|
|||
)
|
||||
}
|
||||
|
||||
fn mouse_interaction(
|
||||
&self,
|
||||
layout: Layout<'_>,
|
||||
viewport: &Rectangle,
|
||||
cursor_position: Point,
|
||||
) -> mouse::Interaction {
|
||||
self.content.widget.mouse_interaction(
|
||||
layout.children().next().unwrap(),
|
||||
viewport,
|
||||
cursor_position,
|
||||
)
|
||||
}
|
||||
|
||||
fn draw(
|
||||
&self,
|
||||
renderer: &mut Renderer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue