diff options
author | 2024-01-05 17:46:33 +0100 | |
---|---|---|
committer | 2024-01-10 10:01:49 +0100 | |
commit | d278bfd21d0399009e652560afb9a4d185e92637 (patch) | |
tree | 7ae77df9ff80f1ccd82935c2d442633ff6b96789 /examples/geometry | |
parent | 22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5 (diff) | |
download | iced-d278bfd21d0399009e652560afb9a4d185e92637.tar.gz iced-d278bfd21d0399009e652560afb9a4d185e92637.tar.bz2 iced-d278bfd21d0399009e652560afb9a4d185e92637.zip |
Replace `width` and `height` with `Widget::size`
Diffstat (limited to 'examples/geometry')
-rw-r--r-- | examples/geometry/src/main.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/geometry/src/main.rs b/examples/geometry/src/main.rs index 50227f1c..d6a4c702 100644 --- a/examples/geometry/src/main.rs +++ b/examples/geometry/src/main.rs @@ -16,12 +16,11 @@ mod rainbow { } impl<Message> Widget<Message, Renderer> for Rainbow { - fn width(&self) -> Length { - Length::Fill - } - - fn height(&self) -> Length { - Length::Shrink + fn size(&self) -> Size<Length> { + Size { + width: Length::Fill, + height: Length::Shrink, + } } fn layout( |