diff options
author | 2024-01-05 17:46:33 +0100 | |
---|---|---|
committer | 2024-01-10 10:01:49 +0100 | |
commit | d278bfd21d0399009e652560afb9a4d185e92637 (patch) | |
tree | 7ae77df9ff80f1ccd82935c2d442633ff6b96789 /widget/src/checkbox.rs | |
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 'widget/src/checkbox.rs')
-rw-r--r-- | widget/src/checkbox.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/widget/src/checkbox.rs b/widget/src/checkbox.rs index a0d9559b..0353b3ad 100644 --- a/widget/src/checkbox.rs +++ b/widget/src/checkbox.rs @@ -174,12 +174,11 @@ where tree::State::new(widget::text::State::<Renderer::Paragraph>::default()) } - fn width(&self) -> Length { - self.width - } - - fn height(&self) -> Length { - Length::Shrink + fn size(&self) -> Size<Length> { + Size { + width: self.width, + height: Length::Shrink, + } } fn layout( |