diff options
author | 2021-11-01 17:39:46 +0700 | |
---|---|---|
committer | 2021-11-01 17:39:46 +0700 | |
commit | c330bb1b69d55d767fa5bb2e0fcc059fbbe07d07 (patch) | |
tree | 664c379f2f2d874ead02e8ace1e995e4875fac21 /native/src | |
parent | a1db8d62c00dc355e677b98fb620cba3b478ae53 (diff) | |
download | iced-c330bb1b69d55d767fa5bb2e0fcc059fbbe07d07.tar.gz iced-c330bb1b69d55d767fa5bb2e0fcc059fbbe07d07.tar.bz2 iced-c330bb1b69d55d767fa5bb2e0fcc059fbbe07d07.zip |
Fix `mouse_interaction` using wrong layout in `PaneGrid`
... when no titlebar is present.
Diffstat (limited to 'native/src')
-rw-r--r-- | native/src/widget/pane_grid/content.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/native/src/widget/pane_grid/content.rs b/native/src/widget/pane_grid/content.rs index d8da6d33..efb3493b 100644 --- a/native/src/widget/pane_grid/content.rs +++ b/native/src/widget/pane_grid/content.rs @@ -204,10 +204,9 @@ where viewport: &Rectangle, cursor_position: Point, ) -> mouse::Interaction { - let mut children = layout.children(); - let (body_layout, title_bar_interaction) = if let Some(title_bar) = &self.title_bar { + let mut children = layout.children(); let title_bar_layout = children.next().unwrap(); let is_over_pick_area = title_bar @@ -225,7 +224,7 @@ where (children.next().unwrap(), mouse_interaction) } else { - (children.next().unwrap(), mouse::Interaction::default()) + (layout, mouse::Interaction::default()) }; self.body |