Fix mouse_interaction using wrong layout in PaneGrid
... when no titlebar is present.
This commit is contained in:
parent
a1db8d62c0
commit
c330bb1b69
1 changed files with 2 additions and 3 deletions
|
|
@ -204,10 +204,9 @@ where
|
||||||
viewport: &Rectangle,
|
viewport: &Rectangle,
|
||||||
cursor_position: Point,
|
cursor_position: Point,
|
||||||
) -> mouse::Interaction {
|
) -> mouse::Interaction {
|
||||||
let mut children = layout.children();
|
|
||||||
|
|
||||||
let (body_layout, title_bar_interaction) =
|
let (body_layout, title_bar_interaction) =
|
||||||
if let Some(title_bar) = &self.title_bar {
|
if let Some(title_bar) = &self.title_bar {
|
||||||
|
let mut children = layout.children();
|
||||||
let title_bar_layout = children.next().unwrap();
|
let title_bar_layout = children.next().unwrap();
|
||||||
|
|
||||||
let is_over_pick_area = title_bar
|
let is_over_pick_area = title_bar
|
||||||
|
|
@ -225,7 +224,7 @@ where
|
||||||
|
|
||||||
(children.next().unwrap(), mouse_interaction)
|
(children.next().unwrap(), mouse_interaction)
|
||||||
} else {
|
} else {
|
||||||
(children.next().unwrap(), mouse::Interaction::default())
|
(layout, mouse::Interaction::default())
|
||||||
};
|
};
|
||||||
|
|
||||||
self.body
|
self.body
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue