From ebe0d4f47ec644d4c91097763de0f9b02e5f9d8a Mon Sep 17 00:00:00 2001 From: daxpedda Date: Fri, 14 Feb 2020 18:03:59 +0100 Subject: Fix custom widget example. --- examples/custom_widget/src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs index 0a570745..19615064 100644 --- a/examples/custom_widget/src/main.rs +++ b/examples/custom_widget/src/main.rs @@ -39,10 +39,13 @@ mod circle { _renderer: &Renderer, _limits: &layout::Limits, ) -> layout::Node { - layout::Node::new(Size::new( - f32::from(self.radius) * 2.0, - f32::from(self.radius) * 2.0, - )) + layout::Node::new( + Size::new( + f32::from(self.radius) * 2.0, + f32::from(self.radius) * 2.0, + ), + Size::ZERO, + ) } fn hash_layout(&self, state: &mut Hasher) { -- cgit