Fix wrapped lines not being considered when measuring TextEditor
This commit is contained in:
parent
8b492a9b44
commit
2ba73b0faf
5 changed files with 38 additions and 22 deletions
|
|
@ -150,6 +150,10 @@ impl text::Editor for () {
|
|||
Size::ZERO
|
||||
}
|
||||
|
||||
fn min_bounds(&self) -> Size {
|
||||
Size::ZERO
|
||||
}
|
||||
|
||||
fn update(
|
||||
&mut self,
|
||||
_new_bounds: Size,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue