Files
egui/tests
ilya sheprutandEmil Ernerfeldt deb9ed9feb Show tooltips of container responses when hovering their children (#7909)
I have found that `ui.horizontal(...).response.on_hover_text(...)`
doesn't work, although [documentation says
otherwise](https://docs.rs/egui/latest/egui/struct.Ui.html#method.horizontal):


> The returned
[Response](https://docs.rs/egui/latest/egui/response/struct.Response.html)
will only have checked for mouse hover but can be used for tooltips
(on_hover_text). It also contains the
[Rect](https://docs.rs/egui/latest/egui/struct.Rect.html) used by the
horizontal layout.The returned
[Response](https://docs.rs/egui/latest/egui/response/struct.Response.html)
will only have checked for mouse hover but can be used for tooltips
(on_hover_text). It also contains the
[Rect](https://docs.rs/egui/latest/egui/struct.Rect.html) used by the
horizontal layout.

So I added fix to this into tooltip, but this looks like a hack, and I
don't know a better place to do so. Do you have a better idea?

This PR is split into two commits: first commit adds test, and you can
see wrong behaviour in the image. Second commit fixes this and also
regenerates the image and you can now see tooltip.

I have used LLM to help me with this PR (codex). And I retained LLM
comment, because such hacks should have some comments, and it seems ok
to me.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2026-10-06 07:28:36 +00:00
..

Test apps

Some application to tests various parts of egui and eframe.

At some point it would be nice to have automatic screenshot regression tests for these.