From a25b1af45690bdd8e1cbb20ee3a5b1c4342de455 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 14 Jun 2024 01:47:39 +0200 Subject: Replace `Command` with a new `Task` API with chain support --- widget/src/container.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'widget/src/container.rs') 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, + operation: &mut dyn Operation<()>, ) { operation.container( self.id.as_ref().map(|id| &id.0), @@ -457,9 +457,9 @@ impl From 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> { +pub fn visible_bounds(id: Id) -> Task> { struct VisibleBounds { target: widget::Id, depth: usize, @@ -538,7 +538,7 @@ pub fn visible_bounds(id: Id) -> Command> { } } - Command::widget(VisibleBounds { + Task::widget(VisibleBounds { target: id.into(), depth: 0, scrollables: Vec::new(), -- cgit