summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer/widget/pane_grid.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-30 08:16:38 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-30 08:16:38 +0200
commit98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e (patch)
tree9e22665e41793517b7ba0b48d7315d3283dfde91 /wgpu/src/renderer/widget/pane_grid.rs
parentd4c4198f7242f168de65146e0ca339e0c1cbfe9b (diff)
downloadiced-98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e.tar.gz
iced-98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e.tar.bz2
iced-98bc8cf2a7c4944d762a0148ca9f615d6ccc0d6e.zip
Rename `MouseCursor` to `mouse::Interaction`
Diffstat (limited to 'wgpu/src/renderer/widget/pane_grid.rs')
-rw-r--r--wgpu/src/renderer/widget/pane_grid.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/wgpu/src/renderer/widget/pane_grid.rs b/wgpu/src/renderer/widget/pane_grid.rs
index 80e2471f..2253e4af 100644
--- a/wgpu/src/renderer/widget/pane_grid.rs
+++ b/wgpu/src/renderer/widget/pane_grid.rs
@@ -1,7 +1,8 @@
use crate::{Primitive, Renderer};
use iced_native::{
+ mouse,
pane_grid::{self, Axis, Pane},
- Element, Layout, MouseCursor, Point, Rectangle, Vector,
+ Element, Layout, Point, Rectangle, Vector,
};
impl pane_grid::Renderer for Renderer {
@@ -22,7 +23,7 @@ impl pane_grid::Renderer for Renderer {
cursor_position
};
- let mut mouse_cursor = MouseCursor::default();
+ let mut mouse_interaction = mouse::Interaction::default();
let mut dragged_pane = None;
let mut panes: Vec<_> = content
@@ -30,11 +31,11 @@ impl pane_grid::Renderer for Renderer {
.zip(layout.children())
.enumerate()
.map(|(i, ((id, pane), layout))| {
- let (primitive, new_mouse_cursor) =
+ let (primitive, new_mouse_interaction) =
pane.draw(self, defaults, layout, pane_cursor_position);
- if new_mouse_cursor > mouse_cursor {
- mouse_cursor = new_mouse_cursor;
+ if new_mouse_interaction > mouse_interaction {
+ mouse_interaction = new_mouse_interaction;
}
if Some(*id) == dragging {
@@ -78,14 +79,14 @@ impl pane_grid::Renderer for Renderer {
(
Primitive::Group { primitives },
if dragging.is_some() {
- MouseCursor::Grabbing
+ mouse::Interaction::Grabbing
} else if let Some(axis) = resizing {
match axis {
- Axis::Horizontal => MouseCursor::ResizingVertically,
- Axis::Vertical => MouseCursor::ResizingHorizontally,
+ Axis::Horizontal => mouse::Interaction::ResizingVertically,
+ Axis::Vertical => mouse::Interaction::ResizingHorizontally,
}
} else {
- mouse_cursor
+ mouse_interaction
},
)
}