1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Preserve text format in truncated label tooltip (#7514)

* Related https://github.com/rerun-io/rerun/issues/10906

This changes the label hover ui to use the provided layout job instead
of the text so that the text format is preserved.
This commit is contained in:
Lucas Meurer
2025-09-08 15:41:05 +02:00
committed by GitHub
parent 34cd613378
commit e5d0b93633
3 changed files with 26 additions and 2 deletions

View File

@@ -282,7 +282,7 @@ impl Widget for Label {
if ui.is_rect_visible(response.rect) {
if show_tooltip_when_elided && galley.elided {
// Show the full (non-elided) text on hover:
response = response.on_hover_text(galley.text());
response = response.on_hover_text(galley.job.clone());
}
let response_color = if interactive {