Skip to content

Commit

Permalink
menu bar mouse interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
latidoremi committed Feb 23, 2024
1 parent 082301b commit 3284e29
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/native/menu/menu_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,25 @@ where
.merge(status)
}

fn mouse_interaction(
&self,
tree: &Tree,
layout: Layout<'_>,
cursor: mouse::Cursor,
viewport: &Rectangle,
renderer: &Renderer,
) -> mouse::Interaction {
self.roots
.iter()
.zip(&tree.children)
.zip(layout.children())
.map(|((item, tree), layout)| {
item.mouse_interaction(tree, layout, cursor, viewport, renderer)
})
.max()
.unwrap_or_default()
}

fn draw(
&self,
tree: &Tree,
Expand Down

0 comments on commit 3284e29

Please sign in to comment.