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

Hover only interactions no longer work #4286

Closed
AnotherNathan opened this issue Mar 30, 2024 · 3 comments · Fixed by #4291
Closed

Hover only interactions no longer work #4286

AnotherNathan opened this issue Mar 30, 2024 · 3 comments · Fixed by #4291
Assignees
Labels
bug Something is broken egui

Comments

@AnotherNathan
Copy link
Contributor

Describe the bug
It seems that any hover only interaction is broken.

To Reproduce
Non of the following examples work any more.

Label::new("my label")
        .selectable(false)
        .ui(ui)
        .on_hover_text("tooltip");

let response = Label::new("my label").selectable(false).ui(ui);
response.interact(Sense::hover()).on_hover_text("tooltip");

let response = Label::new("my label").selectable(false).ui(ui);
ui.interact(response.rect, ui.next_auto_id(), Sense::hover())
        .on_hover_text("tooltip");

The tooltip is never shown.

Expected behavior
Tooltip should be shown when hovering with the cursor on the labels.

Platform:

  • OS: Windows 10
  • Version 22H2

Additional context
I tried 0.27 and master.
Note that this was working fine on 0.26.

@AnotherNathan AnotherNathan added the bug Something is broken label Mar 30, 2024
@YgorSouza
Copy link
Contributor

Reproducible in the demo app as well. If you open the settings and tick off "Selectable text in labels", you can no longer see the tooltips for the settings just above it. Also the progress bar in the widget gallery no longer displays an animation when you hover it.

@rustbasic
Copy link
Contributor

Temporarily until corrected,
Useable Sense::click() or Sense::click_and_drag().

@AnotherNathan
Copy link
Contributor Author

Yes, this works as long as you do not have a widget, with a clickable area and a hoverable area inside of that clickable area (which is what I have unfortunately).

@emilk emilk self-assigned this Mar 31, 2024
emilk added a commit that referenced this issue Mar 31, 2024
…4291)

At least all those above any interactive widget.

* Closes #4286

I feel there is still more thinking to be done about what is considered
`hovered` and how it relates to `contains_pointer`, but this PR at least
fixes tooltips for uninteractive widgets
emilk added a commit that referenced this issue Apr 2, 2024
…4291)

At least all those above any interactive widget.

* Closes #4286

I feel there is still more thinking to be done about what is considered
`hovered` and how it relates to `contains_pointer`, but this PR at least
fixes tooltips for uninteractive widgets
emilk added a commit that referenced this issue Apr 2, 2024
…4291)

At least all those above any interactive widget.

* Closes #4286

I feel there is still more thinking to be done about what is considered
`hovered` and how it relates to `contains_pointer`, but this PR at least
fixes tooltips for uninteractive widgets
emilk added a commit that referenced this issue Apr 2, 2024
…4291)

At least all those above any interactive widget.

* Closes #4286

I feel there is still more thinking to be done about what is considered
`hovered` and how it relates to `contains_pointer`, but this PR at least
fixes tooltips for uninteractive widgets
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 a pull request may close this issue.

4 participants