diff options
author | 2025-02-03 04:34:13 +0100 | |
---|---|---|
committer | 2025-02-03 04:34:13 +0100 | |
commit | 3029481b72a2ca975a9bb915e23c0461334ba54f (patch) | |
tree | 30ce970fe6b9c81a0ab25836c50f16223dd716aa /core | |
parent | 599d8b560bec8036c5ddda62a7bf0a540bdec396 (diff) | |
download | iced-3029481b72a2ca975a9bb915e23c0461334ba54f.tar.gz iced-3029481b72a2ca975a9bb915e23c0461334ba54f.tar.bz2 iced-3029481b72a2ca975a9bb915e23c0461334ba54f.zip |
Ignore redraws of invisible content in `hover` widget
Diffstat (limited to 'core')
-rw-r--r-- | core/src/shell.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/shell.rs b/core/src/shell.rs index 12ebbaa8..c2275f71 100644 --- a/core/src/shell.rs +++ b/core/src/shell.rs @@ -80,6 +80,18 @@ impl<'a, Message> Shell<'a, Message> { self.redraw_request } + /// Replaces the redraw request of the [`Shell`]; without conflict resolution. + /// + /// This is useful if you want to overwrite the redraw request to a previous value. + /// Since it's a fairly advanced use case and should rarely be used, it is a static + /// method. + pub fn replace_redraw_request( + shell: &mut Self, + redraw_request: Option<window::RedrawRequest>, + ) { + shell.redraw_request = redraw_request; + } + /// Returns whether the current layout is invalid or not. pub fn is_layout_invalid(&self) -> bool { self.is_layout_invalid |