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/qr_code.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/qr_code.rs')
-rw-r--r-- | widget/src/qr_code.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/widget/src/qr_code.rs b/widget/src/qr_code.rs index 1dc4da7f..a229eb59 100644 --- a/widget/src/qr_code.rs +++ b/widget/src/qr_code.rs @@ -50,12 +50,11 @@ impl<'a> QRCode<'a> { } impl<'a, Message, Theme> Widget<Message, Renderer<Theme>> for QRCode<'a> { - fn width(&self) -> Length { - Length::Shrink - } - - fn height(&self) -> Length { - Length::Shrink + fn size(&self) -> Size<Length> { + Size { + width: Length::Shrink, + height: Length::Shrink, + } } fn layout( |