1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00
Files
egui/crates
Fleabit 5432f91a4d Have non-resizable Areas ignore mouse input just beyond their bounds (#3039)
As described in #576, the method `Memory::layer_id_at` expands the
hit-testing region for every `Area` slightly. This is necessary so that,
when the user clicks to resize a `Window`, the mouse input isn't routed
to a different `Window`.

For non-resizable `Area`s (such as dropdown menus, context menus, date
pickers, and any non-resizable `Window`), this causes them to be
surrounded by a "dead zone" where any underlying widgets can't be
hovered or clicked. The effect is particularly noticeable in menu bars.

This commit adds a persisted `edges_padded_for_resize` property to
`Area`, which is `true` when the `Area` belongs to a resizable `Window`
and `false` for all other `Area`s. The hit-testing region is only
expanded when this property is `true`.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-01-07 17:04:29 +01:00
..
2023-04-18 15:52:45 +02:00
2024-01-02 07:27:52 +01:00
2023-12-18 17:28:47 +01:00