From 2f557731f313ccc94b5d0ebb4ee5603624670daf Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 15 Jan 2022 11:56:19 +0700 Subject: Make `clock` example responsive --- examples/clock/src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index de9e879a..325ccc1a 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -66,16 +66,12 @@ impl Application for Clock { } fn view(&mut self) -> Element { - let canvas = Canvas::new(self) - .width(Length::Units(400)) - .height(Length::Units(400)); + let canvas = Canvas::new(self).width(Length::Fill).height(Length::Fill); Container::new(canvas) .width(Length::Fill) .height(Length::Fill) .padding(20) - .center_x() - .center_y() .into() } } -- cgit