Skip to content

Commit

Permalink
Merge branch 'main' into jan/inline-viewer-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk authored Jun 6, 2024
2 parents 4cd8365 + f74b4a2 commit 350524c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/re_ui/src/list_item/list_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ impl ListItem {
/// Can the user click and interact with it?
///
/// Set to `false` for items that only show info, but shouldn't be interactive.
/// Note: making the list item non-interactive does not necessarily make its content
/// non-interactive. For example, a non-interactive list item may be used in conjunction with
/// [`super::PropertyContent`] to build property-like editors.
#[inline]
pub fn interactive(mut self, interactive: bool) -> Self {
self.interactive = interactive;
Expand Down Expand Up @@ -329,7 +332,7 @@ impl ListItem {
(1.0, ui.visuals().selection.bg_fill),
),
);
} else {
} else if interactive {
let bg_fill = if !response.hovered() && ui.rect_contains_pointer(bg_rect) {
// if some part of the content is active and hovered, our background should
// become dimmer
Expand Down

0 comments on commit 350524c

Please sign in to comment.