egui/crates
Emil Ernerfeldt 598dd53059
Fix buggy interaction with widgets outside of clip rect (#4675)
This fixes a bug which sometimes would make it possible to interact with
widgets that were outside the parent clip_rect.

Interaction with a widget is done with the `interact_rect`, which is the
intersection of the widget rect and the parent clip rect. If these
rectangles are disjoint (the widget is outside the parent clip rect),
this results in a _negative rectangle_ (a rectangle with a negative
width and/or height). The distance tests for negative rectangles were
broken, causing the bug.

* This is part of solving https://github.com/emilk/egui/issues/4475
* It is also likely this would have solved
https://github.com/emilk/egui/issues/4349 (which now has another fix for
it)


### Breaking changes
`Rect::distance_to_pos`, `distance_sq_to_pos`, `signed_distance_to_pos`
now all return `f32::INFINITY` if the rectangle is negative.
2024-06-19 10:21:54 +02:00
..
ecolor Add `Color32::lerp_to_gamma` (#4627) 2024-06-06 15:41:10 +02:00
eframe Make sure to call `raw_input_hook` on web (#4646) 2024-06-18 22:37:04 +02:00
egui Fix buggy interaction with widgets outside of clip rect (#4675) 2024-06-19 10:21:54 +02:00
egui-wgpu Update to wgpu 0.20 (#4560) 2024-06-13 15:00:23 +02:00
egui-winit Do no use the ahash reimport (#4504) 2024-05-27 16:24:50 +02:00
egui_demo_app `egui_extras`: Make `serde` an optional feature (#4641) 2024-06-18 22:27:48 +02:00
egui_demo_lib Fix dead link to mycomarkup in easy_mark sample (#4643) 2024-06-18 22:36:56 +02:00
egui_extras `egui_extras`: Make `serde` an optional feature (#4641) 2024-06-18 22:27:48 +02:00
egui_glow Do no use the ahash reimport (#4504) 2024-05-27 16:24:50 +02:00
egui_plot egui_plot: use `f64` for translate (#4637) 2024-06-18 22:55:08 +02:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Fix buggy interaction with widgets outside of clip rect (#4675) 2024-06-19 10:21:54 +02:00
epaint Bug fix: ui opacity and gray-out not affecting strokes (#4581) 2024-05-29 22:37:55 +02:00