summaryrefslogtreecommitdiffstats
path: root/widget/src/text_editor.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-07 14:01:05 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-07 14:06:52 +0200
commit13289dbd1933e7d7a0b21cffd197813f8f6f7fc0 (patch)
tree85cbda9aa86c277e623943307c63a33e192ae609 /widget/src/text_editor.rs
parent5e01d767c5ef8a35937675d4e8f02b4c678a5da2 (diff)
parent1c241d1150d2f7b5d0ae154439325950e5d25f38 (diff)
downloadiced-13289dbd1933e7d7a0b21cffd197813f8f6f7fc0.tar.gz
iced-13289dbd1933e7d7a0b21cffd197813f8f6f7fc0.tar.bz2
iced-13289dbd1933e7d7a0b21cffd197813f8f6f7fc0.zip
Merge branch 'master' into wgpu/better-architecture
Diffstat (limited to 'widget/src/text_editor.rs')
-rw-r--r--widget/src/text_editor.rs15
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();