diff options
author | 2024-03-29 16:58:11 -0700 | |
---|---|---|
committer | 2024-03-29 16:58:11 -0700 | |
commit | 385a4490fb6a344873ba5154275a33acc011d080 (patch) | |
tree | 83ed20e9e94de6ca39dbaad65d6e5622ebc017d1 /widget | |
parent | 5071e3d231699f67347a11b829cc8c9e50e54370 (diff) | |
download | iced-385a4490fb6a344873ba5154275a33acc011d080.tar.gz iced-385a4490fb6a344873ba5154275a33acc011d080.tar.bz2 iced-385a4490fb6a344873ba5154275a33acc011d080.zip |
Expose line_height & text_size fields for the text_editor widget
Diffstat (limited to 'widget')
-rw-r--r-- | widget/src/text_editor.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs index a00df3c7..92cdb251 100644 --- a/widget/src/text_editor.rs +++ b/widget/src/text_editor.rs @@ -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(); |