Take Into<Pixels> in TextEditor::width

Since a `Shrink` width would not make sense.
This commit is contained in:
Héctor Ramón Jiménez 2024-09-13 01:08:23 +02:00
parent ac1d98aa9b
commit 4081e2b192
No known key found for this signature in database
GPG key ID: 4C07CEC81AFA161F

View file

@ -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
}