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> {
|
fn view(&mut self) -> Element<Message> {
|
||||||
let canvas = Canvas::new(self)
|
let canvas = Canvas::new(self).width(Length::Fill).height(Length::Fill);
|
||||||
.width(Length::Units(400))
|
|
||||||
.height(Length::Units(400));
|
|
||||||
|
|
||||||
Container::new(canvas)
|
Container::new(canvas)
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
.height(Length::Fill)
|
.height(Length::Fill)
|
||||||
.padding(20)
|
.padding(20)
|
||||||
.center_x()
|
|
||||||
.center_y()
|
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue