summaryrefslogtreecommitdiffstats
path: root/wgpu/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wgpu/src/renderer/widget/image_pane.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/wgpu/src/renderer/widget/image_pane.rs b/wgpu/src/renderer/widget/image_pane.rs
index 8b032250..a7cee6ac 100644
--- a/wgpu/src/renderer/widget/image_pane.rs
+++ b/wgpu/src/renderer/widget/image_pane.rs
@@ -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
}
},
)