Rebase to master and update for api changes

This commit is contained in:
Cory Forsstrom 2020-05-14 11:54:05 -07:00
parent 7f7e803448
commit 6bf459e068
No known key found for this signature in database
GPG key ID: 64D6B5851FFCAC9E
2 changed files with 19 additions and 42 deletions

View file

@ -1,5 +1,5 @@
use crate::{Primitive, Renderer};
use iced_native::{image, image_pane, MouseCursor, Rectangle, Vector};
use iced_native::{image, image_pane, mouse, Rectangle, Vector};
impl image_pane::Renderer for Renderer {
fn draw(
@ -24,14 +24,14 @@ impl image_pane::Renderer for Renderer {
},
{
if state.is_cursor_clicked() {
MouseCursor::Grabbing
mouse::Interaction::Grabbing
} else if is_mouse_over
&& (image_bounds.width > bounds.width
|| image_bounds.height > bounds.height)
{
MouseCursor::Grab
mouse::Interaction::Grab
} else {
MouseCursor::Idle
mouse::Interaction::Idle
}
},
)