summaryrefslogtreecommitdiffstats
path: root/wgpu/src/renderer/widget/scrollable.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-05-05 00:05:47 +0200
committerLibravatar GitHub <noreply@github.com>2020-05-05 00:05:47 +0200
commit7dc02a5e16a3143b7c3ba9270207e3ebda71d567 (patch)
treedd727f138641fbda008af8e7827369cc99420749 /wgpu/src/renderer/widget/scrollable.rs
parent27aad74a32fd8ac2b12f9d32df8a3b61a3175457 (diff)
parent93c6be5eef577f0778b5787dac37351c035ed471 (diff)
downloadiced-7dc02a5e16a3143b7c3ba9270207e3ebda71d567.tar.gz
iced-7dc02a5e16a3143b7c3ba9270207e3ebda71d567.tar.bz2
iced-7dc02a5e16a3143b7c3ba9270207e3ebda71d567.zip
Merge pull request #325 from hecrj/feature/canvas-interaction
Canvas interactivity and Game of Life example
Diffstat (limited to 'wgpu/src/renderer/widget/scrollable.rs')
-rw-r--r--wgpu/src/renderer/widget/scrollable.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/wgpu/src/renderer/widget/scrollable.rs b/wgpu/src/renderer/widget/scrollable.rs
index 732523e3..8a400b82 100644
--- a/wgpu/src/renderer/widget/scrollable.rs
+++ b/wgpu/src/renderer/widget/scrollable.rs
@@ -1,7 +1,5 @@
use crate::{Primitive, Renderer};
-use iced_native::{
- scrollable, Background, Color, MouseCursor, Rectangle, Vector,
-};
+use iced_native::{mouse, scrollable, Background, Color, Rectangle, Vector};
const SCROLLBAR_WIDTH: u16 = 10;
const SCROLLBAR_MARGIN: u16 = 2;
@@ -56,7 +54,7 @@ impl scrollable::Renderer for Renderer {
scrollbar: Option<scrollable::Scrollbar>,
offset: u32,
style_sheet: &Self::Style,
- (content, mouse_cursor): Self::Output,
+ (content, mouse_interaction): Self::Output,
) -> Self::Output {
(
if let Some(scrollbar) = scrollbar {
@@ -118,9 +116,9 @@ impl scrollable::Renderer for Renderer {
content
},
if is_mouse_over_scrollbar || state.is_scroller_grabbed() {
- MouseCursor::Idle
+ mouse::Interaction::Idle
} else {
- mouse_cursor
+ mouse_interaction
},
)
}