summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/widget/button.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/widget/button.rs b/core/src/widget/button.rs
index 9cf20071..e7961284 100644
--- a/core/src/widget/button.rs
+++ b/core/src/widget/button.rs
@@ -19,6 +19,8 @@ pub struct Button<'a, Message, Element> {
pub width: Length,
+ pub min_width: u32,
+
pub padding: u16,
pub background: Option<Background>,
@@ -52,6 +54,7 @@ impl<'a, Message, Element> Button<'a, Message, Element> {
content: content.into(),
on_press: None,
width: Length::Shrink,
+ min_width: 0,
padding: 0,
background: None,
border_radius: 0,
@@ -66,6 +69,11 @@ impl<'a, Message, Element> Button<'a, Message, Element> {
self
}
+ pub fn min_width(mut self, min_width: u32) -> Self {
+ self.min_width = min_width;
+ self
+ }
+
pub fn padding(mut self, padding: u16) -> Self {
self.padding = padding;
self