summaryrefslogtreecommitdiffstats
path: root/native/src/widget/pane_grid/content.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/widget/pane_grid/content.rs')
-rw-r--r--native/src/widget/pane_grid/content.rs17
1 files changed, 9 insertions, 8 deletions
diff --git a/native/src/widget/pane_grid/content.rs b/native/src/widget/pane_grid/content.rs
index 98ce2c4b..c236d820 100644
--- a/native/src/widget/pane_grid/content.rs
+++ b/native/src/widget/pane_grid/content.rs
@@ -115,25 +115,25 @@ where
let show_controls = bounds.contains(cursor_position);
- title_bar.draw(
- &tree.children[1],
+ self.body.as_widget().draw(
+ &tree.children[0],
renderer,
theme,
style,
- title_bar_layout,
+ body_layout,
cursor_position,
viewport,
- show_controls,
);
- self.body.as_widget().draw(
- &tree.children[0],
+ title_bar.draw(
+ &tree.children[1],
renderer,
theme,
style,
- body_layout,
+ title_bar_layout,
cursor_position,
viewport,
+ show_controls,
);
} else {
self.body.as_widget().draw(
@@ -238,6 +238,7 @@ where
cursor_position: Point,
viewport: &Rectangle,
renderer: &Renderer,
+ drag_enabled: bool,
) -> mouse::Interaction {
let (body_layout, title_bar_interaction) =
if let Some(title_bar) = &self.title_bar {
@@ -247,7 +248,7 @@ where
let is_over_pick_area = title_bar
.is_over_pick_area(title_bar_layout, cursor_position);
- if is_over_pick_area {
+ if is_over_pick_area && drag_enabled {
return mouse::Interaction::Grab;
}