diff options
author | 2024-06-16 20:24:41 +0200 | |
---|---|---|
committer | 2024-06-16 20:24:41 +0200 | |
commit | 95d4adb55e485c01eec839736f328be26f2ccab6 (patch) | |
tree | 2676e3cb8ec17c5bf1cd561d97932ae302551dfd /widget/src/container.rs | |
parent | e6d0b3bda5042a1017a5944a5227c97e0ed6caf9 (diff) | |
parent | b5c5a016c4f2b608a740b37c494186557a064f48 (diff) | |
download | iced-95d4adb55e485c01eec839736f328be26f2ccab6.tar.gz iced-95d4adb55e485c01eec839736f328be26f2ccab6.tar.bz2 iced-95d4adb55e485c01eec839736f328be26f2ccab6.zip |
Merge pull request #2463 from iced-rs/task-api
`Task` API
Diffstat (limited to 'widget/src/container.rs')
-rw-r--r-- | widget/src/container.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/widget/src/container.rs b/widget/src/container.rs index 51967707..e917471f 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -13,7 +13,7 @@ use crate::core::{ Padding, Pixels, Point, Rectangle, Shadow, Shell, Size, Theme, Vector, Widget, }; -use crate::runtime::Command; +use crate::runtime::Task; /// An element decorating some content. /// @@ -258,7 +258,7 @@ where tree: &mut Tree, layout: Layout<'_>, renderer: &Renderer, - operation: &mut dyn Operation<Message>, + operation: &mut dyn Operation<()>, ) { operation.container( self.id.as_ref().map(|id| &id.0), @@ -457,9 +457,9 @@ impl From<Id> for widget::Id { } } -/// Produces a [`Command`] that queries the visible screen bounds of the +/// Produces a [`Task`] that queries the visible screen bounds of the /// [`Container`] with the given [`Id`]. -pub fn visible_bounds(id: Id) -> Command<Option<Rectangle>> { +pub fn visible_bounds(id: Id) -> Task<Option<Rectangle>> { struct VisibleBounds { target: widget::Id, depth: usize, @@ -538,7 +538,7 @@ pub fn visible_bounds(id: Id) -> Command<Option<Rectangle>> { } } - Command::widget(VisibleBounds { + Task::widget(VisibleBounds { target: id.into(), depth: 0, scrollables: Vec::new(), |