diff options
author | 2022-01-15 11:56:19 +0700 | |
---|---|---|
committer | 2022-01-15 11:56:19 +0700 | |
commit | 2f557731f313ccc94b5d0ebb4ee5603624670daf (patch) | |
tree | 7c345287218a8344325c353cbdedd62401bb685f /examples | |
parent | 75348c5b8cbe7f997e4c704021fdce8fd9bd862c (diff) | |
download | iced-2f557731f313ccc94b5d0ebb4ee5603624670daf.tar.gz iced-2f557731f313ccc94b5d0ebb4ee5603624670daf.tar.bz2 iced-2f557731f313ccc94b5d0ebb4ee5603624670daf.zip |
Make `clock` example responsive
Diffstat (limited to 'examples')
-rw-r--r-- | examples/clock/src/main.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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<Message> { - 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() } } |