Touch support for PaneGrid and PickList (#650)
* touch events properly parsed and converted to logical size, button working * scrolling with a nice touch * fixed application state level touch cursor. panel_grid is touchable now. * format glicthes fixes * format glitches * tight format * fixed pane grid * fixing with upstream * Remove unused `touch` module from `iced_core` * Remove unused `crate::text` import in `iced_native` * Remove redundant match branch in `iced_winit` * Keep removed line break in `UserInterface::update` * Compute `text_size` only when bounds contains cursor in `overlay::menu` Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
This commit is contained in:
parent
2f10a1f2a2
commit
9e453843b2
4 changed files with 93 additions and 71 deletions
|
|
@ -6,6 +6,7 @@ use crate::overlay;
|
|||
use crate::overlay::menu::{self, Menu};
|
||||
use crate::scrollable;
|
||||
use crate::text;
|
||||
use crate::touch;
|
||||
use crate::{
|
||||
Clipboard, Element, Hasher, Layout, Length, Point, Rectangle, Size, Widget,
|
||||
};
|
||||
|
|
@ -214,7 +215,8 @@ where
|
|||
_clipboard: Option<&dyn Clipboard>,
|
||||
) -> event::Status {
|
||||
match event {
|
||||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => {
|
||||
Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left))
|
||||
| Event::Touch(touch::Event::FingerPressed { .. }) => {
|
||||
let event_status = if *self.is_open {
|
||||
// TODO: Encode cursor availability in the type system
|
||||
*self.is_open =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue