Turn Touch into a touch::Event enum
This commit is contained in:
parent
09110a93b0
commit
3bdf931925
9 changed files with 89 additions and 118 deletions
|
|
@ -6,7 +6,7 @@ use crate::layout;
|
|||
use crate::mouse;
|
||||
use crate::row;
|
||||
use crate::text;
|
||||
use crate::touch::{self, Touch};
|
||||
use crate::touch;
|
||||
use crate::{
|
||||
Align, Clipboard, Element, Hasher, HorizontalAlignment, Layout, Length,
|
||||
Point, Rectangle, Row, Text, VerticalAlignment, Widget,
|
||||
|
|
@ -156,10 +156,7 @@ where
|
|||
) -> event::Status {
|
||||
match event {
|
||||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left))
|
||||
| Event::Touch(Touch {
|
||||
phase: touch::Phase::Started,
|
||||
..
|
||||
}) => {
|
||||
| Event::Touch(touch::Event::FingerPressed { .. }) => {
|
||||
let mouse_over = layout.bounds().contains(cursor_position);
|
||||
|
||||
if mouse_over {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue