summaryrefslogtreecommitdiffstats
path: root/widget/src/button.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-08 00:36:37 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-08 00:37:00 +0100
commit1db823b4c528441627dd075d989fca2fa0a44346 (patch)
tree8f2d892726c2a5f653c47623e703179c0c3c3107 /widget/src/button.rs
parentc99e5996478ee74e5328ef5aaa1d350fcc06933b (diff)
downloadiced-1db823b4c528441627dd075d989fca2fa0a44346.tar.gz
iced-1db823b4c528441627dd075d989fca2fa0a44346.tar.bz2
iced-1db823b4c528441627dd075d989fca2fa0a44346.zip
Make `PickList` padding consistent with `Button`
Diffstat (limited to 'widget/src/button.rs')
-rw-r--r--widget/src/button.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/widget/src/button.rs b/widget/src/button.rs
index a23a7156..243eaf04 100644
--- a/widget/src/button.rs
+++ b/widget/src/button.rs
@@ -63,14 +63,6 @@ impl<'a, Message, Theme, Renderer> Button<'a, Message, Theme, Renderer>
where
Renderer: crate::core::Renderer,
{
- /// The default [`Padding`] of a [`Button`].
- pub const DEFAULT_PADDING: Padding = Padding {
- top: 5.0,
- bottom: 5.0,
- right: 10.0,
- left: 10.0,
- };
-
/// Creates a new [`Button`] with the given content.
pub fn new(
content: impl Into<Element<'a, Message, Theme, Renderer>>,
@@ -86,7 +78,7 @@ where
on_press: None,
width: size.width.fluid(),
height: size.height.fluid(),
- padding: Self::DEFAULT_PADDING,
+ padding: DEFAULT_PADDING,
clip: false,
style: Theme::default_style(),
}
@@ -391,6 +383,14 @@ where
}
}
+/// The default [`Padding`] of a [`Button`].
+pub(crate) const DEFAULT_PADDING: Padding = Padding {
+ top: 5.0,
+ bottom: 5.0,
+ right: 10.0,
+ left: 10.0,
+};
+
/// The possible status of a [`Button`].
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Status {