summaryrefslogtreecommitdiffstats
path: root/examples/custom_widget
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-05 17:46:33 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-01-10 10:01:49 +0100
commitd278bfd21d0399009e652560afb9a4d185e92637 (patch)
tree7ae77df9ff80f1ccd82935c2d442633ff6b96789 /examples/custom_widget
parent22226394f7b1a0e0205b9bb5b3ef9b85a3b406f5 (diff)
downloadiced-d278bfd21d0399009e652560afb9a4d185e92637.tar.gz
iced-d278bfd21d0399009e652560afb9a4d185e92637.tar.bz2
iced-d278bfd21d0399009e652560afb9a4d185e92637.zip
Replace `width` and `height` with `Widget::size`
Diffstat (limited to 'examples/custom_widget')
-rw-r--r--examples/custom_widget/src/main.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/custom_widget/src/main.rs b/examples/custom_widget/src/main.rs
index 32a14cbe..7ffb4cd0 100644
--- a/examples/custom_widget/src/main.rs
+++ b/examples/custom_widget/src/main.rs
@@ -33,12 +33,11 @@ mod circle {
where
Renderer: renderer::Renderer,
{
- 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(