diff options
| author | 2024-02-07 21:48:28 +0100 | |
|---|---|---|
| committer | 2024-02-07 21:48:28 +0100 | |
| commit | 2ba73b0faf04c21053f279e7c189b28ca718d853 (patch) | |
| tree | 482aa7ceac3e22533cb0a1732c951337765e68a8 /core | |
| parent | 8b492a9b443993f1db2d3df31a29bc68738d73c9 (diff) | |
| download | iced-2ba73b0faf04c21053f279e7c189b28ca718d853.tar.gz iced-2ba73b0faf04c21053f279e7c189b28ca718d853.tar.bz2 iced-2ba73b0faf04c21053f279e7c189b28ca718d853.zip | |
Fix wrapped lines not being considered when measuring `TextEditor`
Diffstat (limited to '')
| -rw-r--r-- | core/src/renderer/null.rs | 4 | ||||
| -rw-r--r-- | core/src/text/editor.rs | 4 | 
2 files changed, 8 insertions, 0 deletions
| diff --git a/core/src/renderer/null.rs b/core/src/renderer/null.rs index 75a3c8b6..83688ff7 100644 --- a/core/src/renderer/null.rs +++ b/core/src/renderer/null.rs @@ -150,6 +150,10 @@ impl text::Editor for () {          Size::ZERO      } +    fn min_bounds(&self) -> Size { +        Size::ZERO +    } +      fn update(          &mut self,          _new_bounds: Size, diff --git a/core/src/text/editor.rs b/core/src/text/editor.rs index f3c6e342..fbf60696 100644 --- a/core/src/text/editor.rs +++ b/core/src/text/editor.rs @@ -36,6 +36,10 @@ pub trait Editor: Sized + Default {      /// Returns the current boundaries of the [`Editor`].      fn bounds(&self) -> Size; +    /// Returns the minimum boundaries to fit the current contents of +    /// the [`Editor`]. +    fn min_bounds(&self) -> Size; +      /// Updates the [`Editor`] with some new attributes.      fn update(          &mut self, | 
