egui/crates
lucasmerlin 4c8b95f365
Fix clickable widgets blocking scrolling on touch screens (#3815)
Currently, when you try dragging a ScrollArea and start over a button,
the button blocks the ScrollArea from receiving the drag event.

This PR updates layer_rects_this_frame and layer_rects_prev_frame to
include the Sense and will use it to check if the previous layer has a
sense that would be a conflict.

<details><summary>Videos</summary>
<p>
(In both videos I'm clicking and dragging)

Before: 


https://github.com/emilk/egui/assets/8009393/83cc5a8a-2283-46d6-9337-164e1289f701

After (I modified the WidgetGallery to be scrollable, as you can see you
can now scroll over buttons and dragging the slider still blocks the
scroll):


https://github.com/emilk/egui/assets/8009393/be634cf8-3af2-4520-ba1c-bb8bfcc82997

Scrolling in the sidebar also works now:


https://github.com/emilk/egui/assets/8009393/d4309bec-22e1-4fb4-a425-7b029237849b


</p>
</details>

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-01-15 10:08:41 +01:00
..
ecolor Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
eframe Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
egui Fix clickable widgets blocking scrolling on touch screens (#3815) 2024-01-15 10:08:41 +01:00
egui-wgpu Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
egui-winit Add keys `?`, `/`, `|` (#3820) 2024-01-15 10:08:22 +01:00
egui_demo_app Selectable text in Labels (#3814) 2024-01-14 15:17:55 +01:00
egui_demo_lib Selectable text in Labels (#3814) 2024-01-14 15:17:55 +01:00
egui_extras Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
egui_glow Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
egui_plot Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
epaint Selectable text in Labels (#3814) 2024-01-14 15:17:55 +01:00