summaryrefslogtreecommitdiffstats
path: root/widget/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-13 01:08:23 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-09-13 01:08:23 +0200
commit4081e2b19257378ef6c454f2e3abe57f25a2f088 (patch)
tree705fa71545a354d5adce103b7103be97d83d250d /widget/src
parentac1d98aa9b8b0bb0cf3bd6a3b89406d003403bfe (diff)
downloadiced-4081e2b19257378ef6c454f2e3abe57f25a2f088.tar.gz
iced-4081e2b19257378ef6c454f2e3abe57f25a2f088.tar.bz2
iced-4081e2b19257378ef6c454f2e3abe57f25a2f088.zip
Take `Into<Pixels>` in `TextEditor::width`
Since a `Shrink` width would not make sense.
Diffstat (limited to 'widget/src')
-rw-r--r--widget/src/text_editor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index 0029bc87..7e2a30f1 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -110,8 +110,8 @@ where
}
/// Sets the width of the [`TextEditor`].
- pub fn width(mut self, width: impl Into<Length>) -> Self {
- self.width = width.into();
+ pub fn width(mut self, width: impl Into<Pixels>) -> Self {
+ self.width = Length::from(width.into());
self
}