From ac1d98aa9b8b0bb0cf3bd6a3b89406d003403bfe Mon Sep 17 00:00:00 2001 From: Samson Date: Sun, 21 Jul 2024 09:29:24 -0500 Subject: feat: add width setter --- widget/src/text_editor.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'widget') 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) -> Self { + self.width = width.into(); + self + } + /// Sets the message that should be produced when some action is performed in /// the [`TextEditor`]. /// -- cgit