summaryrefslogtreecommitdiffstats
path: root/widget/src/button.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/button.rs')
-rw-r--r--widget/src/button.rs13
1 files changed, 6 insertions, 7 deletions
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(