From 76737351ea9e116291112b7d576d9ed4f6bb5c2a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 12 Jul 2024 18:12:34 +0200 Subject: Re-export variants of `Length` and `alignment` types --- examples/clock/src/main.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'examples/clock') 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 { - 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 { -- cgit