-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hover not recognized right next to Area #576
Comments
seems to be caused by |
So the issue is I am now looking into disabling this extra radius for areas which are not resizable. |
Lines 472 to 488 in 5cef4ff
one issue with this PR might be, that any non-interactable area can be found as a layer here. Maybe something like a "resizable" property is needed, so there can be interactable, but non-resizable areas. Similar to the "movable" property. |
As described in emilk#576, the function `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`.
…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>
This is what the container looks like:
The same thing happens on master with the
menu
:debug on hover also shows that in that area none of the two overlapping widgets are hovered.
I suspect it is something with
Context::interact
, but I didn't figure it out yet. Any help would be appreciated 👍🏻required for #543
The text was updated successfully, but these errors were encountered: