Merge pull request #52 from phoglund/fix_desired_rows

Fix the accessor for desired rows.
This commit is contained in:
Emil Ernerfeldt 2020-11-26 14:34:00 +01:00 committed by GitHub
commit 8bb4368f97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,8 +197,8 @@ impl<'t> TextEdit<'t> {
/// Set the number of rows to show by default.
/// The default for singleline text is `1`.
/// The default for multiline text is `4`.
pub fn desired_rows(mut self, desired_width: f32) -> Self {
self.desired_width = Some(desired_width);
pub fn desired_rows(mut self, desired_height_rows: usize) -> Self {
self.desired_height_rows = desired_height_rows;
self
}
}