Skip to content

Commit

Permalink
Fix appearance of ListItem in a tooltip
Browse files Browse the repository at this point in the history
Requires a hack for the clip_rect.
I opened an issue to track this:
* #5740
  • Loading branch information
emilk committed Apr 2, 2024
1 parent c504eba commit 04ae476
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/re_data_ui/src/data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ impl crate::DataUi for re_smart_channel::SmartChannelSource {
if !recordings.is_empty() {
ui.add_space(8.0);
ui.strong("Recordings from this data source");
let max_rect = ui.max_rect();
ui.indent("recordings", |ui| {
ui.set_clip_rect(max_rect); // TODO(#5740): Hack required because `entity_db_button_ui` uses `ListItem`, which fills the full width until the clip rect.
ui.spacing_mut().item_spacing.y = 0.0;
for entity_db in recordings {
entity_db_button_ui(ctx, ui, entity_db, true);
Expand All @@ -60,7 +62,9 @@ impl crate::DataUi for re_smart_channel::SmartChannelSource {
if !blueprints.is_empty() {
ui.add_space(8.0);
ui.strong("Blueprints from this data source");
let max_rect = ui.max_rect();
ui.indent("blueprints", |ui| {
ui.set_clip_rect(max_rect); // TODO(#5740): Hack required because `entity_db_button_ui` uses `ListItem`, which fills the full width until the clip rect.
ui.spacing_mut().item_spacing.y = 0.0;
for entity_db in blueprints {
entity_db_button_ui(ctx, ui, entity_db, true);
Expand Down

0 comments on commit 04ae476

Please sign in to comment.