From d278bfd21d0399009e652560afb9a4d185e92637 Mon Sep 17 00:00:00 2001
From: Héctor Ramón Jiménez <hector@hecrj.dev>
Date: Fri, 5 Jan 2024 17:46:33 +0100
Subject: Replace `width` and `height` with `Widget::size`

---
 widget/src/button.rs | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'widget/src/button.rs')

diff --git a/widget/src/button.rs b/widget/src/button.rs
index ba68caa5..1ce4f662 100644
--- a/widget/src/button.rs
+++ b/widget/src/button.rs
@@ -11,7 +11,7 @@ use crate::core::widget::tree::{self, Tree};
 use crate::core::widget::Operation;
 use crate::core::{
     Background, Clipboard, Color, Element, Layout, Length, Padding, Point,
-    Rectangle, Shell, Vector, Widget,
+    Rectangle, Shell, Size, Vector, Widget,
 };
 
 pub use iced_style::button::{Appearance, StyleSheet};
@@ -149,12 +149,11 @@ where
         tree.diff_children(std::slice::from_ref(&self.content));
     }
 
-    fn width(&self) -> Length {
-        self.width
-    }
-
-    fn height(&self) -> Length {
-        self.height
+    fn size(&self) -> Size<Length> {
+        Size {
+            width: self.width,
+            height: self.height,
+        }
     }
 
     fn layout(
-- 
cgit