Show idle cursor if image can't be panned

This commit is contained in:
Cory Forsstrom 2020-04-23 16:22:53 -07:00
parent 0d8cefbf2d
commit 7f7e803448
No known key found for this signature in database
GPG Key ID: 64D6B5851FFCAC9E

View File

@ -25,10 +25,13 @@ impl image_pane::Renderer for Renderer {
{
if state.is_cursor_clicked() {
MouseCursor::Grabbing
} else if is_mouse_over {
} else if is_mouse_over
&& (image_bounds.width > bounds.width
|| image_bounds.height > bounds.height)
{
MouseCursor::Grab
} else {
MouseCursor::OutOfBounds
MouseCursor::Idle
}
},
)