summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--native/src/widget/pane_grid.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs
index 8eadac48..3ef578bf 100644
--- a/native/src/widget/pane_grid.rs
+++ b/native/src/widget/pane_grid.rs
@@ -757,7 +757,12 @@ pub fn draw<Renderer, T>(
cursor_position
};
- for ((id, pane), layout) in elements.zip(layout.children()) {
+ // Render picked pane last
+ let mut elements = elements.zip(layout.children()).collect::<Vec<_>>();
+ elements
+ .sort_by_key(|((id, _), _)| picked_pane.map(|(id, _)| id) == Some(*id));
+
+ for ((id, pane), layout) in elements {
match picked_pane {
Some((dragging, origin)) if id == dragging => {
let bounds = layout.bounds();