diff options
author | 2025-02-07 03:26:20 +0100 | |
---|---|---|
committer | 2025-02-07 03:26:20 +0100 | |
commit | 940a079d83f904bef0eb9514fce50cd0109219c9 (patch) | |
tree | d7d45ddbbcd3a57cf38c0bf90fabfaa1f1085b9a | |
parent | 4bbb5cbc1f8b2a0ee8e09be18071368df3ba5bbd (diff) | |
parent | a8b1aef0a43e49de5a683336ca5f559843b0fb43 (diff) | |
download | iced-940a079d83f904bef0eb9514fce50cd0109219c9.tar.gz iced-940a079d83f904bef0eb9514fce50cd0109219c9.tar.bz2 iced-940a079d83f904bef0eb9514fce50cd0109219c9.zip |
Merge pull request #2795 from tarkah/fix/image-viewer-redraw
Request redraw in image viewer update
-rw-r--r-- | widget/src/image/viewer.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/widget/src/image/viewer.rs b/widget/src/image/viewer.rs index 06652ff7..811241a9 100644 --- a/widget/src/image/viewer.rs +++ b/widget/src/image/viewer.rs @@ -215,6 +215,7 @@ where } } + shell.request_redraw(); shell.capture_event(); } Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Left)) => { @@ -226,6 +227,8 @@ where state.cursor_grabbed_at = Some(cursor_position); state.starting_offset = state.current_offset; + + shell.request_redraw(); shell.capture_event(); } Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Left)) => { @@ -233,6 +236,7 @@ where if state.cursor_grabbed_at.is_some() { state.cursor_grabbed_at = None; + shell.request_redraw(); shell.capture_event(); } } @@ -273,6 +277,7 @@ where }; state.current_offset = Vector::new(x, y); + shell.request_redraw(); shell.capture_event(); } } |