Skip to content

Commit 385a449

Browse files
committed
Expose line_height & text_size fields for the text_editor widget
1 parent 5071e3d commit 385a449

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

widget/src/text_editor.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ where
110110
self
111111
}
112112

113+
/// Sets the text size of the [`TextEditor`].
114+
pub fn size(mut self, size: impl Into<Pixels>) -> Self {
115+
self.text_size = Some(size.into());
116+
self
117+
}
118+
119+
/// Sets the [`text::LineHeight`] of the [`TextEditor`].
120+
pub fn line_height(
121+
mut self,
122+
line_height: impl Into<text::LineHeight>,
123+
) -> Self {
124+
self.line_height = line_height.into();
125+
self
126+
}
127+
113128
/// Sets the [`Padding`] of the [`TextEditor`].
114129
pub fn padding(mut self, padding: impl Into<Padding>) -> Self {
115130
self.padding = padding.into();

0 commit comments

Comments
 (0)