diff options
author | 2024-10-25 15:40:05 +0200 | |
---|---|---|
committer | 2024-11-05 23:52:58 +0100 | |
commit | 752403d70c851ece620c4007710062b158e8dec3 (patch) | |
tree | 8d98a4100dec46c123edd3d3fa4966110da6003c /widget/src/text_editor.rs | |
parent | 7fbc195b11f9a858bcc8f56f76907af82c966c26 (diff) | |
download | iced-752403d70c851ece620c4007710062b158e8dec3.tar.gz iced-752403d70c851ece620c4007710062b158e8dec3.tar.bz2 iced-752403d70c851ece620c4007710062b158e8dec3.zip |
Split `Shell::request_redraw` into two different methods
Diffstat (limited to 'widget/src/text_editor.rs')
-rw-r--r-- | widget/src/text_editor.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index a298252a..3bb45494 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -624,7 +624,7 @@ where focus.is_window_focused = true; focus.updated_at = Instant::now(); - shell.request_redraw(window::RedrawRequest::NextFrame); + shell.request_redraw(); } } Event::Window(window::Event::RedrawRequested(now)) => { @@ -637,11 +637,11 @@ where - (now - focus.updated_at).as_millis() % Focus::CURSOR_BLINK_INTERVAL_MILLIS; - shell.request_redraw(window::RedrawRequest::At( + shell.request_redraw_at( now + Duration::from_millis( millis_until_redraw as u64, ), - )); + ); } } } |