Skip to content

Commit 28e85ba

Browse files
committed
Show idle cursor if image can't be panned
1 parent 0a365ad commit 28e85ba

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

wgpu/src/renderer/widget/image_pane.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ impl image_pane::Renderer for Renderer {
2525
{
2626
if state.is_cursor_clicked() {
2727
MouseCursor::Grabbing
28-
} else if is_mouse_over {
28+
} else if is_mouse_over
29+
&& (image_bounds.x > bounds.x || image_bounds.y > bounds.y)
30+
{
2931
MouseCursor::Grab
3032
} else {
31-
MouseCursor::OutOfBounds
33+
MouseCursor::Idle
3234
}
3335
},
3436
)

0 commit comments

Comments
 (0)