summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorLibravatar Samson <nazaritee@pm.pme>2024-07-21 09:29:24 -0500
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-13 01:03:35 +0200
commitac1d98aa9b8b0bb0cf3bd6a3b89406d003403bfe (patch)
tree2b873247bddf4ecb6a8f08f02bb129359f6fa036 /widget
parentaed59bae5033c68fb7e1e1b07e7935d763d3665a (diff)
downloadiced-ac1d98aa9b8b0bb0cf3bd6a3b89406d003403bfe.tar.gz
iced-ac1d98aa9b8b0bb0cf3bd6a3b89406d003403bfe.tar.bz2
iced-ac1d98aa9b8b0bb0cf3bd6a3b89406d003403bfe.zip
feat: add width setter
Diffstat (limited to 'widget')
-rw-r--r--widget/src/text_editor.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index e0102656..0029bc87 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -109,6 +109,12 @@ where
self
}
+ /// Sets the width of the [`TextEditor`].
+ pub fn width(mut self, width: impl Into<Length>) -> Self {
+ self.width = width.into();
+ self
+ }
+
/// Sets the message that should be produced when some action is performed in
/// the [`TextEditor`].
///