Make clock example responsive
This commit is contained in:
parent
75348c5b8c
commit
2f557731f3
1 changed files with 1 additions and 5 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue