summaryrefslogtreecommitdiffstats
path: root/widget/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--widget/src/combo_box.rs2
-rw-r--r--widget/src/text_input.rs5
2 files changed, 5 insertions, 2 deletions
diff --git a/widget/src/combo_box.rs b/widget/src/combo_box.rs
index 956a470a..91a91c32 100644
--- a/widget/src/combo_box.rs
+++ b/widget/src/combo_box.rs
@@ -70,7 +70,7 @@ where
on_input: None,
on_blur: None,
menu_style: Default::default(),
- padding: Padding::new(0.0),
+ padding: text_input::DEFAULT_PADDING,
size: None,
}
}
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs
index 9958cbcc..b899eb67 100644
--- a/widget/src/text_input.rs
+++ b/widget/src/text_input.rs
@@ -76,6 +76,9 @@ where
style: <Renderer::Theme as StyleSheet>::Style,
}
+/// The default [`Padding`] of a [`TextInput`].
+pub const DEFAULT_PADDING: Padding = Padding::new(5.0);
+
impl<'a, Message, Renderer> TextInput<'a, Message, Renderer>
where
Message: Clone,
@@ -95,7 +98,7 @@ where
is_secure: false,
font: None,
width: Length::Fill,
- padding: Padding::new(5.0),
+ padding: DEFAULT_PADDING,
size: None,
line_height: text::LineHeight::default(),
on_input: None,