Show idle cursor if image can't be panned
This commit is contained in:
parent
0d8cefbf2d
commit
7f7e803448
1 changed files with 5 additions and 2 deletions
|
|
@ -25,10 +25,13 @@ impl image_pane::Renderer for Renderer {
|
||||||
{
|
{
|
||||||
if state.is_cursor_clicked() {
|
if state.is_cursor_clicked() {
|
||||||
MouseCursor::Grabbing
|
MouseCursor::Grabbing
|
||||||
} else if is_mouse_over {
|
} else if is_mouse_over
|
||||||
|
&& (image_bounds.width > bounds.width
|
||||||
|
|| image_bounds.height > bounds.height)
|
||||||
|
{
|
||||||
MouseCursor::Grab
|
MouseCursor::Grab
|
||||||
} else {
|
} else {
|
||||||
MouseCursor::OutOfBounds
|
MouseCursor::Idle
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue