Skip to content

Commit

Permalink
Don't max the tooltip width
Browse files Browse the repository at this point in the history
  • Loading branch information
abey79 committed May 14, 2024
1 parent b06d115 commit 06573e2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions crates/re_data_ui/src/instance_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ impl DataUi for InstancePath {
continue; // no need to show components that are unset at this point in time
};

list_item.show_flat(
ui,
let mut content =
re_ui::list_item2::PropertyContent::new(component_name.short_name())
.with_icon(icon)
.value_fn(|_, ui, _| {
Expand Down Expand Up @@ -146,8 +145,14 @@ impl DataUi for InstancePath {
instance,
);
}
}),
)
});

// avoid the list item to max the tooltip width
if ui_layout == UiLayout::Tooltip {
content = content.exact_width(true);
}

list_item.show_flat(ui, content)
};

if interactive {
Expand Down

0 comments on commit 06573e2

Please sign in to comment.