Skip to content
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

Fix interactive widgets sometimes being incorrectly marked as hovered #5523

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

emilk
Copy link
Owner

@emilk emilk commented Dec 27, 2024

An interactive widget should only be marked hovered if a click/drag would start an interaction with it.

egui 0.30 introduced a feature where a thin interactive widget could be hit even if it was partially behind a larger interactive widget. Unfortunately, this introduced a bug where the top widget would still be marked as hovered, even though a click would go through to the thin widget below.

This bug was most notacible when trying to reisize a window by dragging its corner, which often would result in dragging one of its sides instead.

This PR fixes this bug.

An interactive widget should only be marked hovered if a click/drag
would start an interaction with it.

egui 0.30 introduced a feature where a thin interactive widget
could be hit even if it was partially behind a larger interactive
widget. Unfortunately, this introduced a bug where the top widget
would still be marked as hovered, even though a click would go through
to the thin widget below.

This bug was most notacible when trying to reisize a window by dragging
its corner, which often would result in dragging one of its sides
instead.

This PR fixes this bug.
@emilk emilk added bug Something is broken egui labels Dec 27, 2024
Copy link

Preview available at https://egui-pr-preview.github.io/pr/5523-emilkfix-wrong-hovered
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk emilk merged commit 4d945f7 into master Dec 27, 2024
48 checks passed
@emilk emilk deleted the emilk/fix-wrong-hovered branch December 27, 2024 13:47
emilk added a commit that referenced this pull request Dec 27, 2024
This makes it easier to hit the corners.
Previously the corner response-area was covered by the response-areas of
the edges.

* Related to #5523
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant