Merge pull request #2358 from bungoboingo/text-editor-font-size

Some text_editor QoL
This commit is contained in:
Héctor Ramón 2024-04-02 10:12:07 +02:00 committed by GitHub
commit b17f890482
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,6 +110,21 @@ where
self
}
/// Sets the text size of the [`TextEditor`].
pub fn size(mut self, size: impl Into<Pixels>) -> Self {
self.text_size = Some(size.into());
self
}
/// Sets the [`text::LineHeight`] of the [`TextEditor`].
pub fn line_height(
mut self,
line_height: impl Into<text::LineHeight>,
) -> Self {
self.line_height = line_height.into();
self
}
/// Sets the [`Padding`] of the [`TextEditor`].
pub fn padding(mut self, padding: impl Into<Padding>) -> Self {
self.padding = padding.into();