summaryrefslogtreecommitdiffstats
path: root/examples/clock/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/clock/src/main.rs')
-rw-r--r--examples/clock/src/main.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs
index 4584a0c7..ef3064c7 100644
--- a/examples/clock/src/main.rs
+++ b/examples/clock/src/main.rs
@@ -4,7 +4,7 @@ use iced::time;
use iced::widget::canvas::{stroke, Cache, Geometry, LineCap, Path, Stroke};
use iced::widget::{canvas, container};
use iced::{
- Degrees, Element, Font, Length, Point, Rectangle, Renderer, Subscription,
+ Degrees, Element, Fill, Font, Point, Rectangle, Renderer, Subscription,
Theme, Vector,
};
@@ -43,15 +43,9 @@ impl Clock {
}
fn view(&self) -> Element<Message> {
- let canvas = canvas(self as &Self)
- .width(Length::Fill)
- .height(Length::Fill);
-
- container(canvas)
- .width(Length::Fill)
- .height(Length::Fill)
- .padding(20)
- .into()
+ let canvas = canvas(self as &Self).width(Fill).height(Fill);
+
+ container(canvas).padding(20).into()
}
fn subscription(&self) -> Subscription<Message> {